given a string, find the longest substring that starts and ends in the same letter
Anonymous
I used two maps (or histograms if you want to make sure it's O(1)) in order to save the earliest index of the letters in the ABC and the latest. Returned the letter that the difference between the two was the highest.
Check out your Company Bowl for anonymous work chats.