New ask Hacker News story: How do you guys come up with such an algorithm

How do you guys come up with such an algorithm
2 by Handsome2734 | 4 comments on Hacker News.
I was on an Apple QA interview yesterday, and I was asked to design a stack, which can do push and pop, and should have O(1) complexity to find the minimum value. I couldn't solve the problem, so after the interview, I looked up Google and found this: https://ift.tt/fj1UQqw I wonder how you come up with such a solution when given the problem. It seems just incredible.

Comments

Popular posts from this blog

How can Utilize Call Center Outsourcing for Increase your Business Income well?

New ask Hacker News story: Is someone trying to steal credit for inventing the eTicket?