/LeetCode

Primary LanguageC++

Dynamic Programming

0005.LongestPalindromicSubstring
0010. Regular Expression Matching
0011.ContainerWithMostWater
0032. Longest Valid Parentheses
0042.Trapping Rain Water
0044.Wildcard Matching
0053. Maximum Subarray
0062.Unique Paths
0070. Climbing Stairs
0072. Edit Distance
0091.DecodeWays
0121. Best Time to Buy and Sell Stock
0139. Word Break
0152. Maximum Product Subarray
0198. House Robber
0204. Count Primes
0238. Product of Array Except Self
0279. Perfect Squares
0300. Longest Increasing Subsequence
0322. Coin Change
0334. Increasing Triplet Subsequence
0354. Russian Doll Envelopes
0368.Largest Divisible Subset
0392. Is Subsequence
0413. Arithmetic Slices
0674. Longest Continuous Increasing Subsequence
0799. Champagne Tower

Greedy Algorithm

0055.JumpGame
0094.BinaryTreeInorderTraversal
0122. Best Time to Buy and Sell Stock II
0134. Gas Station
0991. Broken Calculator
1029. Two City Scheduling

Divide and Conquer

0014.LongestCommonPrefix

DFS && BFS

0079. Word Search
0127. Word Ladder
0130. Surrounded Regions
0138. Copy List with Random Pointer
0199. Binary Tree Right Side View
0200. Number of Islands
0410. Split Array Largest Sum
0437.Path Sum III
0538. Convert BST to Greater Tree

Binary Operation

0033. Search in Rotated Sorted Array
0034. Find First and Last Position of Element in Sorted Array
0050. Pow(x, n)
0069. Sqrt(x)
0162. Find Peak Element
TODO0235. Lowest Common Ancestor of a Binary Search Tree Bit 0240. Search a 2D Matrix II
0374.Guess Number Higher or Lower
0540.Single Element in a Sorted Array

Back Trace

0017.LetterCombinationOfAPhoneNumber
0022. Generate Parentheses
0046. Permutations
0051. N-Queens
0078. Subsets
0079. Word Search
0131. Palindrome Partitioning
0089. Gray Code
0212.Word Search II
0399. Evaluate Division
0437.Path Sum III
1239.Maximum Length of a Concatenated String with Unique Characters
1286.Iterator for Combination

Sort

0004.medianOfSortedArray
0056. Merge Intervals
0075. Sort Colors
0088. Merge Sorted Array
0148. Sort List
0179. Largest Number
0704. Binary Search

Search

0033. Search in Rotated Sorted Array
0081. Search in Rotated Sorted Array II

In-place

0026. Remove Duplicates from Sorted Array
0073. Set Matrix Zeroes
0151.Reverse Words in a String
0283. Move Zeroes
0442. Find All Duplicates in an Array

Two Points

0015.3Sum
0019.RemoveNthNodeFromEndOfList
0209.Minimum Size Subarray Sum
0287. Find the Duplicate Number
0560.Subarray Sum Equals K
0658.Find K Closest Elements
0680. Valid Palindrome II

N-sum

0001.TwoSum

Prefix Sum

0209.Minimum Size Subarray Sum
0304. Range Sum Query 2D - Immutable
0410. Split Array Largest Sum
0560.Subarray Sum Equals K
1074. Number of Submatrices That Sum to Target
1413.Minimum Value to Get Positive Step by Step Sum

Bit Manipulation

0136. Single Number
0137.Single Number II
0191. Number of 1 Bits
0260.Single Number III
0268. Missing Number
1342. Number of Steps to Reduce a Number to Zero

Base in Mathematics

0013.RomanToInteger

Palindromic

0005.LongestPalindromicSubstring
0009.PalindromeNumber
0125. Valid Palindrome
0234. Palindrome Linked List
0680. Valid Palindrome II

List

0002.AddTwoNumber
0019.RemoveNthNodeFromEndOfList
0021. Merge Two Sorted Lists
0023. Merge k Sorted Lists
0092. Reverse Linked List II
TODO0061. Rotate List
0138. Copy List with Random Pointer
0141. Linked List Cycle
0148. Sort List
0160. Intersection of Two Linked Lists
0206. Reverse Linked List
0234. Palindrome Linked List
0237. Delete Node in a Linked List
0328. Odd Even Linked List

Graph

0207. Course Schedule
0210. Course Schedule II

Stack && Queue

0020.ValidParentheses
0023. Merge k Sorted Lists
0150. Evaluate Reverse Polish Notation
0155. Min Stack
0496.Next Greater Element I
0682. Baseball Game
0856. Score of Parentheses
0895. Maximum Frequency Stack
0946. Validate Stack Sequences
1249. Minimum Remove to Make Valid Parentheses

Monotonic Stack && Queue

0239. Sliding Window Maximum 0316. Remove Duplicate Letters
0456.132Pattern
0496.Next Greater Element I
0503. Next Greater Element II
1696. Jump Game VI

Priority Queue

0451.Sort Characters By Frequency

Array

0347. Top K Frequent Elements
0448.Find All Numbers Disappeared in an Array

Tree

0094.BinaryTreeInorderTraversal
0098.ValidateBinarySearchTree
0101.SymmetricTree
0102.BinaryTreeLevelOrderTraversal
0103.BinaryTreeZiazagLevelOrderTraveral
0104.MaximumDepthofBinaryTree
0105. Construct Binary Tree from Preorder and Inorder Traversal
0106.Construct Binary Tree from Inorder and Postorder Traversal
0108. Convert Sorted Array to Binary Search Tree
0114. Flatten Binary Tree to Linked List
0116. Populating Next Right Pointers in Each Node
0124. Binary Tree Maximum Path Sum
0144. Binary Tree Preorder Traversal
0145. Binary Tree Postorder Traversal
0199. Binary Tree Right Side View
0230. Kth Smallest Element in a BST
0226.Invert Binary Tree
0222.Count Complete Tree Nodes
0337. House Robber III
0437.Path Sum III
0450.Delete Node in a BST
0538. Convert BST to Greater Tree
0700. Search in a Binary Search Tree
0993.Cousins in Binary Tree
1008.Construct Binary Search Tree from Preorder Traversal

String

0344. Reverse String
1663. Smallest String With A Given Numeric Value

Sliding Window

0003. Longest Substring Without Repeating Characters
0239. Sliding Window Maximum
0978.Longest Turbulent Subarray
1696. Jump Game VI

Word Count

0916.Word Subsets

Combination Of Datastructure

0146. LRU Cache
0380. Insert Delete GetRandom O(1)

Reference

https://www.cnblogs.com/yrbbest/tag/LeetCode/