2024年2月8日发(作者:)
3340395159基础Longest Substring Without Repeating CharactersLongest Substring with At Most K Distinct CharactersSliding WindowSliding WindowLongest Substring with At Least K Repeating CharactersSliding WindowLongest Substring with At Most Two Distinct CharactersSliding WindowPalindrome125Valid Palindrome266Palindrome Permutation5Longest Palindromic Substring9Palindrome Number214Shortest Palindrome336Palindrome Pairs131Palindrome Partitioning132Palindrome Partitioning II267Palindrome Permutation IIParentheses20Valid Parentheses22Generate Parentheses32Longest Valid Parentheses241Different Ways to Add Parentheses301Remove Invalid ParenthesesSubsequence392Is Subsequence115Distinct Subsequences187Repeated DNA Sequences3. Math基础7Reverse Integer165Compare Version Numbers66Plus One8String to Integer (atoi)258Add Digits67Add Binary43Multiply Strings29Divide Two Integers69Sqrt(x)50Pow(x, n)367Valid Perfect Square365Water and Jug Problem204Count PrimesSum1Two Sum167Two Sum II - Input array is sorted153Sum163Sum Closest很少考2593Sum Smaller很少考184Sum很少考231Power of Two326Power of Three342Power of Four372Super Pow233Number of Digit One319Bulb Switcher292Nim Game202Happy Number很少考
202400基础Happy NumberNth Digit263Ugly Number264Ugly Number II306Additive Number172Factorial Trailing Zeroes343Integer Break396Rotate Function390Elimination Game386Lexicographical Numbers357Count Numbers with Unique Digits360Sort Transformed Array397Integer Replacement368Largest Divisible Subset4. Tree基础144Binary Tree Preorder Traversal94Binary Tree Inorder Traversal145Binary Tree Postorder Traversal102Binary Tree Level Order TraversalPreorder100Same Tree101Symmetric Tree226Invert Binary Tree257Binary Tree Paths112Path Sum113Path Sum II129Sum Root to Leaf Numbers298Binary Tree Longest Consecutive Sequence111Minimum Depth of Binary TreePostorder104Maximum Depth of Binary Tree110Balanced Binary Tree124Binary Tree Maximum Path Sum250Count Univalue Subtrees366Find Leaves of Binary Tree337House Robber IIIBFS107Binary Tree Level Order Traversal II103Binary Tree Zigzag Level Order Traversal199Binary Tree Right Side ViewBST98Validate Binary Search Tree235Lowest Common Ancestor of a Binary Search Tree236Lowest Common Ancestor of a Binary Tree108Convert Sorted Array to Binary Search Tree109Convert Sorted List to Binary Search Tree173Binary Search Tree Iterator230Kth Smallest Element in a BST297Serialize and Deserialize Binary Tree285Inorder Successor in BST270Closest Binary Search Tree Value272Closest Binary Search Tree Value II99Recover Binary Search Tree重要程度156Binary Tree Upside DownpreorderInorderpostorderDFS + BFSpreorderpreorderpreorder + BFSpreorderpreorderpreorderpreorderpreorderpreorderpostorderpostorderpostorderpostorderpostorderpostorder + preorderBFSBFSBFS + preorderpreorderpreorderpostorderbinary searchbinary searchinorderinorderBFSinorderpreorderinorderinorder很少考
4854Spiral Matrix59Spiral Matrix IIRotate Image73Set Matrix Zeroes311Sparse Matrix Multiplication329Longest Increasing Path in a Matrix378Kth Smallest Element in a Sorted Matrix74Search a 2D Matrix240Search a 2D Matrix II370Range Addition79Word Search296Best Meeting Point361Bomb Enemy317Shortest Distance from All Buildings302Smallest Rectangle Enclosing Black Pixels36Valid Sudoku37Sudoku Solver10. DFS & BFS基础200Number of Islands286Walls and Gates130Surrounded Regions339Nested List Weight Sum364Nested List Weight Sum II127Word Ladder5152N-QueensN-Queens II126Word Ladder II11. Stack & PriorityQueueStack22738584PriorityQueue2218332341Kth Largest Element in an ArrayTop K Frequent ElementsSuper Ugly NumberThe Skyline ProblemReconstruct ItineraryFlatten Nested List Iterator很少考Find K Pairs with Smallest Sums很少考Min StackImplement Queue using StacksImplement Stack using QueuesEvaluate Reverse Polish NotationSimplify PathLongest Absolute File PathDecode StringBasic CalculatorBasic Calculator IIMini ParserLargest Rectangle in Histogram12. Bit Manipulation基础
389基础Find the Difference136Single Number318很少考393280UTF-8 ValidationBitwise AND of Numbers RangeSum of Two IntegersCounting BitsGray CodeMissing NumberNumber of 1 BitsReverse BitsSingle Number IISingle Number IIIMaximum Product of Word Lengths13. Topological Sort基础207Course Schedule210Course Schedule II269Alien Dictionary14. Random基础模板Reservoir Sampling384Shuffle an Array398Random Pick Index382Linked List Random Node380Insert Delete GetRandom O(1)381Insert Delete GetRandom O(1) - Duplicates allowed138Copy List with Random Pointer15. Graph基础133399310图形学3353Self CrossingMax Points on a LineLine ReflectionPerfect RectangleRectangle Area很少考很少考很少考很少考Clone GraphEvaluate DivisionMinimum Height Trees16. Union FInd基础261Graph Valid Tree323Number of Connected Components in an Undirected Graph305Number of Islands II17. Trie基础211Add and Search Word - Data structure design208Implement Trie (Prefix Tree)212Word Search II
18. Design基础359Logger Rate Limiter346Moving Average from Data StreamSliding Window362Design Hit Counter281Zigzag Iterator284Peeking Iterator251Flatten 2D Vector288Unique Word Abbreviation170Two Sum III - Data structure design348Design Tic-Tac-Toe379Design Phone Directory353Design Snake Game146LRU Cache355Design Twitter303Range Sum Query - Immutable304Range Sum Query 2D - Immutable307Range Sum Query - Mutable308Range Sum Query 2D - MutableBinary Index TreeBinary Index Tree


发布评论