about | help | code help+videos | done | prefs |
Write a method that finds the least product of any pair of integers in the array of positive integers. If the array is too short to have a pair of integers simply return zero. Look at the test data for examples. You may NOT hard-code an assumed initial maximum product! (If you don't understand what this means, ask me) dec9_2016_SLHL_leastProduct([5, 7, 1, 3, 6]) → 3 dec9_2016_SLHL_leastProduct([7000, 3000, 5000, 9000, 12400]) → 15000000 dec9_2016_SLHL_leastProduct([4, 22, 18, 2, 1, 4, 5, 100, 5, 6, 3]) → 2 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 250
Copyright Nick Parlante 2017 - privacy