about | help | code help+videos | done | prefs |
Write a method that accepts a non-negative integer 'num', then returns an array containing 10 single-digit integers such that the digits in the array match the digits in 'num'. If 'num' has fewer than 10 digits, the leading digits will be zero in the array. Look at the test data for examples. test2024_08_29_P1SLHL_digits(8675309) → [0, 0, 0, 8, 6, 7, 5, 3, 0, 9] test2024_08_29_P1SLHL_digits(5551212) → [0, 0, 0, 5, 5, 5, 1, 2, 1, 2] test2024_08_29_P1SLHL_digits(0) → [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ...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