Skip to content

Prepare For Coder Interview – Denny

  • Basic
  • Medium
  • Hard
  • Architect
  • Life

Review: Stack Problems

Posted on January 23, 2018July 26, 2020 by braindenny

The concept of stack is simple. But the problem could be tricky.

It’s not difficult, but might involve lots of details.



Basic Abstractions

Name Summary
Push items to stack VS push indices LeetCode: Reverse Substrings Between Each Pair of Parentheses
Push items to stack VS push string LeetCode: Reverse Substrings Between Each Pair of Parentheses
Different types of elements in the stack LeetCode: Number of Atoms
Don’t forget to push the last segment  
Delayed initialization  

Questions

Num Problem Summary
1 Recursive deletion during pushing process LeetCode: Verify Preorder Serialization of a Binary Tree
2 Examine whether the input string is valid LeetCode: Asteroid Collision
3 When pushing to stack, whether delayed push LeetCode: Decode String
4   Leetcode: Reverse Substrings Between Each Pair of Parentheses

  • CheatSheet: Leetcode For Code Interview
  • CheatSheet: Common Code Problems & Follow-ups

See all stack problems: #stack

  • Review: Stack Problems
  • LintCode: MinimumString
  • LintCode: Input Stream
  • LeetCode: Verify Preorder Serialization of a Binary Tree
  • LeetCode: Validate Stack Sequences
  • LeetCode: Valid Parentheses
  • LeetCode: Ternary Expression Parser
  • LeetCode: Score of Parentheses
  • LeetCode: Remove All Adjacent Duplicates in String II
  • LeetCode: Number of Atoms
  • LeetCode: Minimum Remove to Make Valid Parentheses
  • LeetCode: Minimum Cost Tree From Leaf Values
  • LeetCode: Minimum Add to Make Parentheses Valid
  • LeetCode: Mini Parser
  • LeetCode: Maximum Nesting Depth of Two Valid Parentheses Strings
  • LeetCode: Max Stack
  • LeetCode: Longest Valid Parentheses
  • LeetCode: Longest Absolute File Path
  • LeetCode: Exclusive Time of Functions
  • LeetCode: Evaluate Reverse Polish Notation
  • LeetCode: Decoded String at Index
  • LeetCode: Decode String
  • LeetCode: Construct Binary Tree from String
  • LeetCode: Check If Word Is Valid After Substitutions
  • LeetCode: Basic Calculator III
  • LeetCode: Basic Calculator
  • LeetCode: Baseball Game
  • LeetCode: Asteroid Collision
  • LeetCode: 132 Pattern

See more blog posts.

linkedin
github
slack

Post Views: 6
Posted in ReviewTagged #stack, review

Post navigation

LeetCode: Baseball Game
LeetCode: Flood Fill

Leave a Reply Cancel reply

Your email address will not be published.

Tags

#array #backtracking #bfs #binarytree #bitmanipulation #blog #classic #codetemplate #combination #dfs #dynamicprogramming #game #graph #greedy #heap #inspiring #interval #linkedlist #manydetails #math #palindrome #recursive #slidingwindow #stack #string #subarray #trie #twopointer #twosum binarysearch editdistance hashmap intervaldp knapsack monotone oodesign presum rectangle redo review rotatelist series sql treetraversal unionfind

Recent Posts

  • a
  • a
  • a
  • a
  • a

Recent Comments

    Archives

    Categories

    • Amusing
    • Basic
    • Easy
    • Hard
    • Life
    • Medium
    • Resource
    • Review
    • Series
    • Uncategorized
    Proudly powered by WordPress | Theme: petals by Aurorum.