id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > quiz2022_03_23_APSLHL_greatestProduct
prev  |  next  |  chance

Preconditions: Array 'nums' will contain at least two numbers. All numbers in 'nums' will be distinct (meaning no two numbers will be the same). Return the greatest product that can be made from any two numbers selected from the array 'nums'.


quiz2022_03_23_APSLHL_greatestProduct([3, 7, 4, 1, 8, 6, 5]) → 56
quiz2022_03_23_APSLHL_greatestProduct([24, 2, 5, 7, 11, 20, 21, 8, 3]) → 504
quiz2022_03_23_APSLHL_greatestProduct([17, 23]) → 391

...Save, Compile, Run (ctrl-enter)

public int quiz2022_03_23_APSLHL_greatestProduct(int[] nums) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 230

Copyright Nick Parlante 2017 - privacy