The "coding puzzle of the day" which asks for a "quack" data structure. It's essentially a double ended queue, but the twist is you're supposed to write an O(1) implementation with 3 stacks.
Turns out this is asked for all over, in interviews, CS exams, etc. But it also turns out to be currently unknown or maybe even impossible. Apparently there's a 6 stack implementation known, but not a 3 stack.
Turns out this is asked for all over, in interviews, CS exams, etc. But it also turns out to be currently unknown or maybe even impossible. Apparently there's a 6 stack implementation known, but not a 3 stack.
https://www.cnblogs.com/lz87/p/11955184.html is the common phrasing.