LeetCode分类汇总(Java+Python)

LeetCode分类汇总(Java+Python)

题解在GitHub,欢迎star:https://github.com/louisgry/Algorithm

  • 数据结构
    • stack
    • queue
    • linkedlist
    • binarytree
    • collection
  • 算法思想
    • cursor
    • partition
    • pointers
    • window
    • dp
    • greedy
    • backtracking
    • math

数据结构

stack

    • 20. Valid Parentheses
    • 144. Binary Tree Preorder Traversal
    • more
    • 150. Evaluate Reverse Polish Notation
    • 42. Trapping Rain Water

queue

  • 队列
    • 347. Top K Frequent Elements
    • 102. Binary Tree Level Order Traversal
    • 279. Perfect Squares

linkedlist

  • 链表
    • 206. Reverse Linked List
    • 203. Remove Linked List Elements
    • 24. Swap Nodes in Pairs
    • 237. Delete Node in a Linked List
    • 19. Remove Nth Node From End of List
    • more
    • 234. Palindrome Linked List

binarytree

  • 二叉树
    • 104. Maximum Depth of Binary Tree
    • 111. Minimum Depth of Binary Tree
    • 226. Invert Binary Tree
    • 112. Path Sum
    • 257. Binary Tree Paths
    • 437. Path Sum III
    • 235. Lowest Common Ancestor of a Binary Search Tree
    • more
    • 100. Same Tree
    • 101. Symmetric Tree
    • 222. Count Complete Tree Nodes
    • 110. Balanced Binary Tree
    • 404. Sum of Left Leaves
    • 113. Path Sum II
    • 129. Sum Root to Leaf Numbers

collection

  • 查找表
    • 349. Intersection of Two Arrays
    • 350. Intersection of Two Arrays II
    • 1. Two Sum
    • 454. 4Sum II
    • 447. Number of Boomerangs
    • 219. Contains Duplicate II
    • 220. Contain Duplicate III
    • more
    • 136. Single Number
    • 242. Valid Anagram
    • 202. Happy Number
    • 290. Word Pattern
    • 804. Unique Morse Code Words

算法思想

cursor

  • 游标
    • 283. Move Zeroes
    • more
    • 27. Remove Element
    • 122. Best Time to Buy and Sell Stock II

partition

  • Partition
    • 75. Sort Colors
    • 215. Kth Largest Element in an Array

pointers

  • 双指针
    • 167. Two Sum II - Input array is sorted
    • 11. Container With Most Water
    • 125. Valid Palindrome
    • 345. Reverse Vowels of a String

window

  • 滑动窗口
    • 209. Minimum Size Subarray Sum
    • 3. Longest Substring Without Repeating Characters
    • 438. Find All Anagrams in a String
    • 76. Minimum Window Substring
    • 567. Permutation in String
    • 424. Longest Repeating Character Replacement

dp

  • 动态规划
    • 70. Climbing Stairs
    • 343. Integer Break
    • 198. House Robber
    • 279. Perfect Squares
    • 91. Decode Ways
    • 416. Partition Equal Subset Sum
    • 300. Longest Increasing Subsequence
    • 1143. Longest Common Subsequence

greedy

  • 贪心
    • 455. Assign Cookies
    • 435. Non-overlapping Intervals

backtracking

  • 回溯
    • 17. Letter Combinations of a Phone Number
    • 46. Permutations
    • 77. Combinations
    • 79. Word Search
    • 200. Number of Islands
    • 51. N Queens

math

  • 数学
    • 136. Single Number
    • 9. Palindrome Number

你可能感兴趣的:(算法)