mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
Bug fixes and improvements (#1348)
* Add "reference" for EN version. Bug fixes. * Unify the figure reference as "the figure below" and "the figure above". Bug fixes. * Format the EN markdown files. * Replace "" with <u></u> for EN version and bug fixes * Fix biary_tree_dfs.png * Fix biary_tree_dfs.png * Fix zh-hant/biary_tree_dfs.png * Fix heap_sort_step1.png * Sync zh and zh-hant versions. * Bug fixes * Fix EN figures * Bug fixes * Fix the figure labels for EN version
This commit is contained in:
@ -24,8 +24,8 @@ A double-ended queue, which is a combination of a stack and a queue or two stack
|
||||
|
||||
**Q**: How exactly are undo and redo implemented?
|
||||
|
||||
Undo and redo operations are implemented using two stacks: Stack A for undo and Stack B for redo.
|
||||
Undo and redo operations are implemented using two stacks: Stack `A` for undo and Stack `B` for redo.
|
||||
|
||||
1. Each time a user performs an operation, it is pushed onto Stack A, and Stack B is cleared.
|
||||
2. When the user executes an "undo", the most recent operation is popped from Stack A and pushed onto Stack B.
|
||||
3. When the user executes a "redo", the most recent operation is popped from Stack B and pushed back onto Stack A.
|
||||
1. Each time a user performs an operation, it is pushed onto Stack `A`, and Stack `B` is cleared.
|
||||
2. When the user executes an "undo", the most recent operation is popped from Stack `A` and pushed onto Stack `B`.
|
||||
3. When the user executes a "redo", the most recent operation is popped from Stack `B` and pushed back onto Stack `A`.
|
||||
|
||||
Reference in New Issue
Block a user