LeetCode of algorithms with Java solution
二分查找
- [704] Binary Search
- [441] Arranging Coins
- [222] Count Complete Tree Nodes
- [162] Find Peak Element
- [744] Find Smallest Letter Greater Than Target
- [278] First Bad Version
- [374] Guess Number Higher or Lower
- [69] Sqrt(x)
- [852] Peak Index in a Mountain Array
- [35] Search Insert Position
- [540] Single Element in a Sorted Array
- [454] 4Sum II
- [33] Search in Rotated Sorted Array
- [81] Search in Rotated Sorted Array II
二叉树
二叉树的遍历
- [144] Binary Tree Preorder Traversal
- [94] Binary Tree Inorder Traversal
- [145] Binary Tree Postorder Traversal
二叉树的层序遍历
- [102] Binary Tree Level Order Traversal
- [107] Binary Tree Level Order Traversal II
- [103] Binary Tree Zigzag Level Order Traversal
- [429] N-ary Tree Level Order Traversal
二叉树的路径
二叉树的搜索
- [623] Add One Row to Tree
- [637] Average of Levels in Binary Tree
- [199] Binary Tree Right Side View
- [513] Find Bottom Left Tree Value
- [515] Find Largest Value in Each Tree Row
- [236] Lowest Common Ancestor of a Binary Tree
- [617] Merge Two Binary Trees
- [530] Minimum Absolute Difference in BST
- [116] Populating Next Right Pointers in Each Node
- [700] Search in a Binary Search Tree
二叉树的构造
二叉树的性质
分治
动态规划
GameDP
MatrixDP
SequenceDP
TwoSequenceDP
背包问题
双指针
哈希表
- [575] Distribute Candies
- [500] Keyboard Row
- [771] Jewels and Stones
- [884] Uncommon Words from Two Sentences
回溯
字典树
字符串
- [22] Generate Parentheses
- [929] Unique Email Addresses
- [821] Shortest Distance to a Character
- [709] To Lower Case
- [804] Unique Morse Code Words
尺取法
并查集
- [107] Binary Tree Level Order Traversal II
- [684] Redundant Connection
- [112] Path Sum
- [297] Serialize and Deserialize Binary Tree
- [79] Word Search
排序
数学
- [868] Binary Gap
- [204] Count Primes
- [942] DI String Match
- [461] Hamming Distance
- [476] Number Complement
- [728] Self Dividing Numbers
数组
- [717] 1-bit and 2-bit Characters
- [412] Fizz Buzz
- [832] Flipping an Image
- [349] Intersection of Two Arrays
- [350] Intersection of Two Arrays II
- [905] Sort Array By Parity
- [922] Sort Array By Parity II
- [766] Toeplitz Matrix
- [867] Transpose Matrix
栈
- [844] Backspace String Compare
- [682] Baseball Game
- [224] Basic Calculator
- [150] Evaluate Reverse Polish Notation
- [232] Implement Queue using Stacks
- [225] Implement Stack using Queues
- [32] Longest Valid Parentheses
- [155] Min Stack
- [496] Next Greater Element I
- [71] Simplify Path
- [20] Valid Parentheses
深度优先搜索
- [690] Employee Importance
- [897] Increasing Order Search Tree
- [872] Leaf-Similar Trees
- [542] 01 Matrix
- [104] Maximum Depth of Binary Tree
- [46] Permutations
- [590] N-ary Tree Postorder Traversal
- [589] N-ary Tree Preorder Traversal
贪心
- [455] Assign Cookies
- [392] Is Subsequence
- [452] Minimum Number of Arrows to Burst Balloons
- [435] Non-overlapping Intervals
- [406] Queue Reconstruction by Height