en/docs/chapter_stack_and_queue/summary.md
Q: Is the browser's forward and backward functionality implemented with a doubly linked list?
The forward and backward functionality of a browser is essentially a manifestation of a "stack." When a user visits a new page, that page is added to the top of the stack; when the user clicks the back button, that page is popped from the top of the stack. Using a deque can conveniently implement some additional operations, as mentioned in the "Deque" section.
Q: After popping from the stack, do we need to free the memory of the popped node?
If the popped node will still be needed later, then memory does not need to be freed. If it won't be used afterward, languages like Java and Python have automatic garbage collection, so manual memory deallocation is not required; in C and C++, manual memory deallocation is necessary.
Q: A deque seems like two stacks joined together. What is its purpose?
A deque is like a combination of a stack and a queue, or two stacks joined together. It exhibits the logic of both stack and queue, so it can implement all applications of stacks and queues, and is more flexible.
Q: How are undo and redo specifically implemented?
Use two stacks: stack A for undo and stack B for redo.
A and clear stack B.A and push it onto stack B.B and push it onto stack A.