Given a string of a million numbers, return all repeating 3 digit numbers

You got off lightly, you probably don’t want to be working for a hedge fund where the quants don’t understand basic algorithms 🙂 There is no way to process an arbitrarily-sized data structure in O(1) if, as in this case, you need to visit every element at least once. The best you can hope for … Read more