Given an array of integers, return the most frequent integer.
Anonymous
I started with o(n2) solution and o(n) space. And I wrote code for that. Then he asked me to optimize the code. I was able to optimize it to time O(n) and space O(n). Then he asked me to optimize the space for O(1). I couldn't think of anything. By this time it was almost 60min. The interviewer was not so happy since I he wanted O(1) space. After 5 days I got a reject.
Check out your Company Bowl for anonymous work chats.