Skip to content

fightingdog/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

111 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

LeetCode solutions in C++ 11.

NO. Title Solution Note Difficulty Tag
1 Two Sum C++ Note Easy 数组、哈希表
2 Add Two Numbers C++ Note Medium 链表
3 Longest Substring Without Repeating Characters C++ Note Medium 哈希表、双指针、Sliding Window
4 Median Of Two Sorted Arrays C++ Note Hard 数组、二分查找、分治算法
5 Longest Palindromic Substring C++ Note Medium 字符串、动态规划
6 ZigZag Conversion C++ Note Medium 字符串
11 Container With Most Water C++ Note Medium 数组、双指针
14 Longest Common Prefix C++ Note Easy 字符串
15 3Sum C++ Note Medium 数组、双指针
16 3Sum Closest C++ Note Medium 数组、双指针
17 Letter Combinations of a Phone Number C++ Note Medium 字符串、回溯算法
18 4Sum C++ Note Medium 数组、双指针、哈希表
19 Remove Nth Node From End of List C++ Note Medium 链表、双指针
20 Valid Parentheses C++ Note Easy 栈、字符串
21 Merge Two Sorted Lists C++ Note Easy 链表
23 Merge k Sorted Lists C++ Note Hard 堆、链表、分治算法
26 Remove Duplicates from Sorted Array C++ Note Easy 数组、双指针
27 Remove Element C++ Note Easy 数组、双指针
29 Divide Two Integers C++ Note Medium 数学、二分查找
30 Substring with Concatenation of All Words C++ Note Hard 哈希表、双指针、字符串
31 Next Permutation C++ Note Meidum 数组
33 Search in Rotated Sorted Array C++ Note Medium 数组、二分查找
34 Find First and Last Position of Element in Sorted Array C++ Note Medium 数组、二分查找
35 Search Insert Position C++ Note Easy 数组、二分查找
39 Combination Sum C++ Note Medium 数组、回溯算法
40 Combination Sum II C++ Note Medium 数组、回溯算法
46 Permutations C++ Note Medium 回溯算法
47 Permutations II C++ Note Medium 回溯算法
51 N-Queens C++ Note Hard 回溯算法
55 Jump Game C++ Note Medium 贪心算法、数组
56 Merge Intervals C++ Note Medium 排序、数组
57 Insert Interval C++ Note Hard 排序、数组
68 Text Justification C++ Note Hard 字符串
81 Search in Rotated Sorted Array II C++ Note Medium 数组、二分查找
94 Binary Tree Inorder Traversal C++ Note Meidum 树、栈、哈希表
95 Unique Binary Search Trees II C++ Note Medium 树、动态规划
96 Unique Binary Search Trees C++ Note Medium 树、动态规划
98 Validate Binary Search Tree C++ Note Medium 树、深度优先搜索
100 Same Tree C++ Note Easy 树、深度优先搜索
101 Symmetric Tree C++ Note Easy 树、深度优先搜索、广度优先搜索
102 Binary Tree Level Order Traversal C++ Note Medium 树、广度优先搜索
104 Maximum Depth of Binary Tree C++ Note Easy 树、深度优先搜索
107 Binary Tree Level Order Traversal II C++ Note Easy 树、广度优先搜索
108 Convert Sorted Array to Binary Search Tree C++ Note Easy 树、深度优先搜索
112 Path Sum C++ Note Easy 树、深度优先搜索
113 Path Sum II C++ Note Medium 树、深度优先搜索
122 Best Time to Buy and Sell Stock II C++ Note Easy 贪心算法、数组
141 Linked List Cycle C++ Note Easy 链表、双指针
142 Linked List Cycle II C++ Note Medium 链表、双指针
144 Binary Tree Preorder Traversal C++ Note Medium 栈、树
145 Binary Tree Postorder Traversal C++ Note Hard 栈、树
155 Min Stack C++ Note Easy 栈、设计
206 Reverse Linked List C++ Note Easy 链表
208 Implement Trie (Prefix Tree) C++ Note Medium 设计、字典树
215 Kth Largest Element in an Array C++ Note Medium 堆、分治算法
224 Basic Calculator C++ Note Hard 栈、数字
232 Implement Queue using Stacks C++ Note Easy 栈、设计
239 Sliding Window Maximum C++ Note Hard 堆、Sliding Window
242 Valid Anagram C++ Note Easy 排序、哈希表
264 Ugly Number II C++ Note Medium 堆、数学、动态规划
300 Longest Increasing Subsequence C++ Note Medium 二分查找、动态规划
346 Moving Average from Data Stream C++ Note Easy 队列
347 Top K Frequent Elements C++ Note Medium 堆、哈希表
349 Intersection of Two Arrays C++ Note Easy 排序、哈希表、双指针、二分查找
350 Intersection of Two Arrays II C++ Note Easy 排序、哈希表、双指针、二分查找
409 Longest Palindrome C++ Note Easy 哈希表
496 Next Greater Element I C++ Note Easy
621 Task Scheduler C++ Note Medium 贪心、队列、数字
622 Design Circular Queue C++ Note Medium 设计、队列
682 Baseball Game C++ Note Easy
687 Longest Univalue Path C++ Note Easy 树、递归
698 Partition to K Equal Sum Subsets C++ Note Medium 递归、动态规划
703 Kth Largest Element in a Stream C++ Note Easy
783 Minimum Distance Between BST Nodes C++ Note Easy 树、递归
844 Backspace String Compare C++ Note Easy 栈、双指针
876 Middle of the Linked List C++ Note Easy 链表
922 Sort Array By Parity II C++ Note Easy 排序、数组
933 Number of Recent Calls C++ Note Easy 队列
938 Range Sum of BST C++ Note Easy 树、递归
1046 Last Stone Weight C++ Note Easy 堆、贪心算法

About

LeetCode solutions in C++ 11.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages