I had this question awhile back for a Google phone screen.
Basically it was to write a function that returned a specific value at an index if the array/list only had single digit values for continuous numbers. Basically the list would look like digit_list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 1, 1, 1, 2, 1, 3...] As you can see after nine, ten is split up into 1 and then 0, and eleven is split up into 1 and then 1 and etc. Basically the function was if given an index, return that value at that index. So function(10) would return 1, function(11) would return 0, function(12) would return 1 and etc. So at any given index there is only a single digit value. That means that 100 would be brokent into 1, 0, 0 and 1250 would be 1, 2, 5, 0 and so on and so forth.
Anyways at the time of the interview I messed up since I was trying to think of a magical formula to generate these numbers but in retrospect I can only think of a brute force solution where you would convert these numbers into strings, iterate through them char by char and insert them into the single digit list. Of course this isn't very efficient but I'm not sure how you can do this in an efficient manner as possible.