How to properly answer these questions?

Hi,

I am a software developer that attained a M.S. degree from a leading U.S. uni but some of these questions on leetcode are hard even for me. I have now been able to answer most of the easy questions in about 20-30 mins but some of these interviews by these top companies want you to answer medium to hard type questions in about 30~45 mins.

Since I have studied C.S. to a high degree I keep on using complicated data structures like segment trees and suffix trees to answer some questions. There are even more complicated data structures like bloom filters and cuckoo hashing. Sometimes, it takes me a few days to a week to answer some medium questions. However, when I look at the weekly contests, the top conestants are answering the the entire test in about 30 mins......that's about 10-15 mins per questions. I don't think they are even using complicated data structes.

So my questsion is that basically any question on this site should be answerable in under 30 mins without even using complicated data structures? Am I doing everything wrong?

Comments (0)