They asked me Largest histogram problem .
Anonymous
I started with the naive algorithm O(n^2) and then improved it to O(n log(n)) and after the interviewer asked me to improve more I finally improved it to O(n).
Check out your Company Bowl for anonymous work chats.