Leetcode解题总结(持续更新中)

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

二叉树的路径

  • [124] Binary Tree Maximum Path Sum

二叉树的搜索

  • [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

二叉树的构造

  • [108] Convert Sorted Array to Binary Search Tree

二叉树的性质

  • [669] Trim a Binary Search Tree

分治

  • [241] Different Ways to Add Parentheses

动态规划

GameDP

  • [198] House Robber
  • [486] Predict the Winner

MatrixDP

  • [64] Minimum Path Sum
  • [120] Triangle
  • [62] Unique Paths
  • [63] Unique Paths II

SequenceDP

  • [70] Climbing Stairs
  • [55] Jump Game
  • [300] Longest Increasing Subsequence

TwoSequenceDP

  • [72] Edit Distance
  • [77] Combinations

背包问题

  • [416] Partition Equal Subset Sum
  • [322] Coin Change

双指针

  • [633] Sum of Square Numbers

哈希表

  • [575] Distribute Candies
  • [500] Keyboard Row
  • [771] Jewels and Stones
  • [884] Uncommon Words from Two Sentences

回溯

  • [401] Binary Watch
  • [784] Letter Case Permutation

字典树

  • [211] Add and Search Word - Data structure design
  • [208] Implement Trie (Prefix Tree)

字符串

  • [22] Generate Parentheses
  • [929] Unique Email Addresses
  • [821] Shortest Distance to a Character
  • [709] To Lower Case
  • [804] Unique Morse Code Words

尺取法

  • [209] Minimum Size Subarray Sum

并查集

  • [107] Binary Tree Level Order Traversal II
  • [684] Redundant Connection
  • [112] Path Sum
  • [297] Serialize and Deserialize Binary Tree
  • [79] Word Search

排序

  • [215] Kth Largest Element in an Array
  • [75] Sort Colors

数学

  • [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

链表

链表删除

  • [237] Delete Node in a Linked List

链表反转

  • [77] Combinations
  • [24] Swap Nodes in Pairs

链表合并

  • [160] Intersection of Two Linked Lists
  • [21] Merge Two Sorted Lists

双向链表

  • [707] Design Linked List

kSum

  • [1] Two Sum
  • [15] 3Sum
  • [16] 3Sum Closest

你可能感兴趣的:(Leetcode解题总结(持续更新中))