• + 1 comment

    Guys the point of this is to not rely too much on built-ins, so using collections.deque would likely not work in an interview.

    That being said using stacks for this in Python seems to be too slow so the answer is don't implement Queues with two stacks in Python ;)

    • + 0 comments

      They ask you sometimes how to do a swap without a temp number. It helps them to see how creative you are.