about | help | code help+videos | done | prefs |
Create a method that takes an array of integers called 'nums'. This array will contain all the numbers from 1 to some maximum number in order, but excluding one number. The excluded number could be 1 or any ONE number in the middle. The excluded number will NOT be the last number. Return the missing number. For example, if 'nums' was {1,2,3,4,5,7,8,9,10} you would return 6 since that is the missing number. Look at the test data for other examples. quiz2021_11_16_APSLHL_missing([1, 3]) → 2 quiz2021_11_16_APSLHL_missing([1, 2, 3, 4, 6, 7, 8, 9]) → 5 quiz2021_11_16_APSLHL_missing([1, 2, 3, 4, 6]) → 5 ...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: 220
Copyright Nick Parlante 2017 - privacy