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.0%
0042Trapping Rain WaterGoHardO(n)O(1)❤️51.6%
0071Simplify PathGoMediumO(n)O(n)❤️34.9%
0084Largest Rectangle in HistogramGoHardO(n)O(n)❤️37.4%
0094Binary Tree Inorder TraversalGoMediumO(n)O(1)66.3%
0103Binary Tree Zigzag Level Order TraversalGoMediumO(n)O(n)50.5%
0144Binary Tree Preorder TraversalGoMediumO(n)O(1)57.9%
0145Binary Tree Postorder TraversalGoMediumO(n)O(1)58.1%
0150Evaluate Reverse Polish NotationGoMediumO(n)O(1)38.3%
0155Min StackGoEasyO(n)O(n)46.8%
0173Binary Search Tree IteratorGoMediumO(n)O(1)60.7%
0224Basic CalculatorGoHardO(n)O(n)38.3%
0225Implement Stack using QueuesGoEasyO(n)O(n)47.9%
0227Basic Calculator IIGoMedium38.8%
0232Implement Queue using StacksGoEasyO(n)O(n)52.7%
0331Verify Preorder Serialization of a Binary TreeGoMediumO(n)O(1)41.2%
0341Flatten Nested List IteratorGoMedium54.9%
0385Mini ParserGoMedium34.6%
0394Decode StringGoMediumO(n)O(n)53.0%
0402Remove K DigitsGoMediumO(n)O(1)28.7%
0456132 PatternGoMediumO(n)O(n)30.7%
0496Next Greater Element IGoEasyO(n)O(n)65.9%
0503Next Greater Element IIGoMediumO(n)O(n)58.8%
0636Exclusive Time of FunctionsGoMediumO(n)O(n)55.0%
0682Baseball GameGoEasyO(n)O(n)67.4%
0726Number of AtomsGoHardO(n)O(n)❤️51.0%
0735Asteroid CollisionGoMediumO(n)O(n)43.3%
0739Daily TemperaturesGoMediumO(n)O(n)64.8%
0844Backspace String CompareGoEasyO(n)O(n)47.2%
0856Score of ParenthesesGoMediumO(n)O(n)64.9%
0880Decoded String at IndexGoMediumO(n)O(n)28.2%
0895Maximum Frequency StackGoHardO(n)O(n)63.3%
0901Online Stock SpanGoMediumO(n)O(n)61.5%
0907Sum of Subarray MinimumsGoMediumO(n)O(n)❤️33.1%
0921Minimum Add to Make Parentheses ValidGoMediumO(n)O(n)75.0%
0946Validate Stack SequencesGoMediumO(n)O(n)64.4%
1003Check If Word Is Valid After SubstitutionsGoMediumO(n)O(1)56.6%
1019Next Greater Node In Linked ListGoMediumO(n)O(1)58.3%
1021Remove Outermost ParenthesesGoEasyO(n)O(1)79.2%
1047Remove All Adjacent Duplicates In StringGoEasyO(n)O(1)71.3%
1249Minimum Remove to Make Valid ParenthesesGoMedium64.2%
1673Find the Most Competitive SubsequenceGoMedium45.5%
——————————————————————-——-—————-—————————-————-————-

⬅️上一页

下一页➡️

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