An interviewer asked me yesterday how to implemented a singly linked list using 2 (two) stack objects while keeping the same time complexity of a singly linked list.
Do you have any idea how this could be done?
PS: I may have misunderstood the question in some way, so please tell me if you know about a 'classic' case that is somehow similar to this.
Hope the question was clear.
Cheers!