1st round phone interview: write a function that finds substrings that contains only consecutive repeating characters and return a list of characters that form the substrings. For example, input "thiisiissaa", returns i i s a, input "thiiissisa" returns i, input "abcde" returns a b c d e.
There were three rounds of interview in the 2-hour skype interview that followed the initial phone interview. 1st round, given an unsorted array of integers, sort the array such that the numbers in it form the largest possible number, for example, given [3, 30, 9, 14, 1], the array should be sorted into [9, 3, 30, 14, 1] because 9330141 is the largest number you can form from the numbers in the array. 2nd round, implement a queue using an array. 3rd round, given a list of cities, each city has a population value, write a function that returns a city in the input list. The probability of returning a specific city should be proportional to the population of the city. For example, if the list contains city1 with 15 pop value and city2 with 5 pop value, then if you call the function 4 times, on average it should return city1 for 3 times and city2 once.