about | help | code help+videos | done | prefs |
Write a method that returns an array of digits in increasing order (0 through 9) showing the actual number of times each digit occurred anywhere in the array of positive integers. Note that the index in the array that is being returned indicates what digit you are reporting about, and the value in that index reports the total number of times that digit occurred in the input array. Keep in mind that the input array could be empty, in which case you would return an array of all zeros. airplaneDigitsReport([5783, 3321, 50033, 13131, 8303]) → [3, 4, 1, 9, 0, 2, 0, 1, 2, 0] airplaneDigitsReport([53523, 124, 5329, 12, 253, 78659]) → [0, 2, 5, 4, 1, 5, 1, 1, 1, 2] airplaneDigitsReport([7777777, 777, 7777, 77, 7]) → [0, 0, 0, 0, 0, 0, 0, 17, 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: 350
Copyright Nick Parlante 2017 - privacy