Ryan McGuire wrote:Is [6,2,1,0,0,0,1,0,0,0] the only answer?
Paul Clapham wrote:Nope. If you look at the sequence [6,2,1,0,0,0,1,0,0,0] you will see that there are 6 0's, 2 1's, 1 2's, 0 3's, and so on. The business about [0,1,2,3,4,5,6,7,8,9] is just confusing and misleading, so ignore that.
Arjun Shastry wrote:so if input is
[11,44,99,11,22,55,66,77,10,99] output should be-
[1,5,2,0,2,2,2,2,0,4]? frequency of numbers from 0 to 9?
Campbell Ritchie wrote:this sounds like one of the very few things I thought were diversions when I was on the diversions forum. I shall move it there.