Grokking 75: Top Coding Interview Questions
Ask Author
Back to course home

0% completed

Vote For New Content
V F
Expected result for [2 5 0 0] is wrong

V F

Jan 24, 2025

[2 5 0 0] should return false but submission expects true. Or is there a justification for expecting true?

0

0

Comments
Marieke Talens
Marieke Talens2 months ago

Take another look at Example 1, the number in the position on the array represents the next available steps up to that amount. From nums[3], the value is 4, but only 1 step is needed.

Example 1

  • Input: nums = [1, 2, 3, 4, 5]
  • Expected Output: true
  • **...