2.05 ✅ Stack

Stack #

  • 括号匹配问题及类似问题。第 20 题,第 921 题,第 1021 题。
  • 栈的基本 pop 和 push 操作。第 71 题,第 150 题,第 155 题,第 224 题,第 225 题,第 232 题,第 946 题,第 1047 题。
  • 利用栈进行编码问题。第 394 题,第 682 题,第 856 题,第 880 题。
  • 单调栈利用栈维护一个单调递增或者递减的下标数组。第 84 题,第 456 题,第 496 题,第 503 题,第 739 题,第 901 题,第 907 题,第 1019 题。
No.TitleSolutionDifficultyTimeComplexitySpaceComplexityFavoriteAcceptance
0020Valid ParenthesesGoEasyO(log n)O(1)40.2%
0032Longest Valid ParenthesesGoHard32.8%
0042Trapping Rain WaterGoHardO(n)O(1)❤️59.2%
0071Simplify PathGoMediumO(n)O(n)❤️39.3%
0084Largest Rectangle in HistogramGoHardO(n)O(n)❤️42.6%
0094Binary Tree Inorder TraversalGoEasyO(n)O(1)73.8%
0114Flatten Binary Tree to Linked ListGoMedium61.8%
0143Reorder ListGoMedium52.5%
0144Binary Tree Preorder TraversalGoEasyO(n)O(1)66.8%
0145Binary Tree Postorder TraversalGoEasyO(n)O(1)67.9%
0150Evaluate Reverse Polish NotationGoMediumO(n)O(1)45.7%
0155Min StackGoMediumO(n)O(n)52.3%
0173Binary Search Tree IteratorGoMediumO(n)O(1)69.7%
0224Basic CalculatorGoHardO(n)O(n)42.4%
0225Implement Stack using QueuesGoEasyO(n)O(n)58.6%
0227Basic Calculator IIGoMedium42.4%
0232Implement Queue using StacksGoEasyO(n)O(n)63.2%
0234Palindrome Linked ListGoEasy50.2%
0331Verify Preorder Serialization of a Binary TreeGoMediumO(n)O(1)44.6%
0341Flatten Nested List IteratorGoMedium61.8%
0385Mini ParserGoMedium36.9%
0394Decode StringGoMediumO(n)O(n)57.9%
0402Remove K DigitsGoMediumO(n)O(1)30.6%
0445Add Two Numbers IIGoMedium59.6%
0456132 PatternGoMediumO(n)O(n)32.4%
0496Next Greater Element IGoEasyO(n)O(n)71.4%
0503Next Greater Element IIGoMediumO(n)O(n)63.2%
0581Shortest Unsorted Continuous SubarrayGoMedium36.4%
0589N-ary Tree Preorder TraversalGoEasy75.9%
0636Exclusive Time of FunctionsGoMediumO(n)O(n)61.2%
0682Baseball GameGoEasyO(n)O(n)74.3%
0726Number of AtomsGoHardO(n)O(n)❤️52.1%
0735Asteroid CollisionGoMediumO(n)O(n)44.4%
0739Daily TemperaturesGoMediumO(n)O(n)66.3%
0844Backspace String CompareGoEasyO(n)O(n)48.1%
0853Car FleetGoMedium50.3%
0856Score of ParenthesesGoMediumO(n)O(n)64.8%
0880Decoded String at IndexGoMediumO(n)O(n)28.3%
0895Maximum Frequency StackGoHardO(n)O(n)66.6%
0897Increasing Order Search TreeGoEasy78.4%
0901Online Stock SpanGoMediumO(n)O(n)65.2%
0907Sum of Subarray MinimumsGoMediumO(n)O(n)❤️35.8%
0921Minimum Add to Make Parentheses ValidGoMediumO(n)O(n)75.8%
0946Validate Stack SequencesGoMediumO(n)O(n)67.7%
1003Check If Word Is Valid After SubstitutionsGoMediumO(n)O(1)58.2%
1006Clumsy FactorialGoMedium55.4%
1019Next Greater Node In Linked ListGoMediumO(n)O(1)59.9%
1021Remove Outermost ParenthesesGoEasyO(n)O(1)80.6%
1047Remove All Adjacent Duplicates In StringGoEasyO(n)O(1)69.7%
1111Maximum Nesting Depth of Two Valid Parentheses StringsGoMedium73.0%
1190Reverse Substrings Between Each Pair of ParenthesesGoMedium65.9%
1209Remove All Adjacent Duplicates in String IIGoMedium56.2%
1249Minimum Remove to Make Valid ParenthesesGoMedium65.8%
1614Maximum Nesting Depth of the ParenthesesGoEasy82.3%
1653Minimum Deletions to Make String BalancedGoMedium58.9%
1673Find the Most Competitive SubsequenceGoMedium49.3%
1700Number of Students Unable to Eat LunchGoEasy68.7%
——————————————————————-——-—————-—————————-————-————-

⬅️上一页

下一页➡️

Calendar Apr 8, 2023
Edit Edit this page
本站总访问量:  次 您是本站第  位访问者