[go: nahoru, domu]

Skip to content

NewBoCo/Code-Challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Array Odometer

Given an array of positive numbers, write a method, that "adds one" to the "number" represented by the array, like an odometer.

Sample inputs and outputs

Input:
    [4, 3, 9, 5]

Output:
    [4, 3, 9, 6]
Input:
    [4, 3, 4, 9]

Output:
    [4, 3, 5, 0]
Input:
    [9, 9, 9, 9]

Output:
    [1, 0, 0, 0]

Questions and Answers

  • The array will always be positive integers
  • You must modify the array IN PLACE
  • You will need to code the reverse method as well as the odometer logic

About

Data Structure Code Challenge.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published