Description Submission
Simple Text Editor
Description Submission The reversed operation of append is delete, so the following program can be simplified if we implement these 2 operations as separate modules.
Largest Rectangle
Description Submission Record each possible starting position(When the height increases compared with the previous height) If the height decreases, replace the height of all the […]
Game of Two Stacks
Description Submission Sliding Window To avoid the marginal cases, i and j are guaranteed to be 1 bigger
Equal Stacks
Description Submission Submission Following is not a simplified version We don’t have to use real stacks, moving pointers(or indices) are enough
Is This a Binary Search Tree?
Description Submission The special case should be considered References https://www.geeksforgeeks.org/a-program-to-check-if-a-binary-tree-is-bst-or-not/