about | help | code help+videos | done | prefs |
Write a method that returns the maximum product resulting from splitting a number into two parts. For example, 9004 could be split into 9*004, 90*40, or 900*4. The largest of these is 900*4 which is 3600. So the maxProduct of 9004 is 3600. Look at the test data for other examples. You are allowed to do this recursively, but recursion is NOT required. feb13_2020_HL_maxProduct(987532) → 787788 feb13_2020_HL_maxProduct(832) → 256 feb13_2020_HL_maxProduct(94218) → 75368 ...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: 290
Copyright Nick Parlante 2017 - privacy