• + 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 ;)