r/programming • • May 08 '15

Five programming problems every Software Engineer should be able to solve in less than 1 hour

https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour
2.5k Upvotes

2.1k comments sorted by

View all comments

Show parent comments

0

u/[deleted] May 08 '15

[deleted]

6

u/[deleted] May 08 '15

Hey you can do it, it'll just take O(N) to do a push operation. That's the type of out of the box thinking we need. /s

5

u/Bobshayd May 08 '15

It's amortized O(1), though.

2

u/[deleted] May 08 '15 edited May 08 '15

Nope, you you have to upload the entire stack and push it to the other one. This has to be done whenever adding an element.

→ More replies (3)