snapchat 面试题

原帖地址:mitbbs

碰见了两个 stanford interviewers (上次是google), 考的题都有类似。

1. Implement a Stack (first in last out), requirement is pop, push, findMin
is all O(1) complexity.
2. have 2 queues, implement a skip iterator. pop() gives queue1, then queue2, then queue1, queue2. (第二题是前些日子碰到的,具体有点儿记不清了)。