/LeetCode

LeetCode算法题目 (C、C++实现)

Primary LanguageC

LeetCode

初级算法 - 题目清单

Array

ID Title Difficulty Blog
26 Remove Duplicates from Sorted Array Easy C C++
122 Best Time to Buy and Sell Stock II Easy C C++
189 Rotate Array Easy C C++
217 Contains Duplicate Easy C C++
136 Single Number Easy C C++
350 Intersection of Two Arrays II Easy C C++
66 Plus One Easy C C++
283 Move Zeroes Easy C C++
1 Two Sum Easy C C++
36 Valid Sudoku Medium C C++
48 Rotate Image Medium C C++

Strings

ID Title Difficulty Blog
344 Reverse String Easy C C++
7 Reverse Integer Easy C C++
387 First Unique Character in a String Easy C C++
242 Valid Anagram Easy C C++
125 Valid Palindrome Easy C C++
8 String to Integer (atoi) Medium C C++
28 Implement strStr() Easy C C++
38 Count and Say Easy C C++
14 Longest Common Prefix Easy C C++

Linked List

ID Title Difficulty Blog
237 Delete Node in a Linked List Easy C C++
19 Remove Nth Node From End of List Medium C C++
206 Reverse Linked List Easy C C++
21 Merge Two Sorted Lists Easy C C++
234 Palindrome Linked List Easy C C++
141 Linked List Cycle Easy C C++

Trees

ID Title Difficulty Blog
104 Maximum Depth of Binary Tree Easy C C++
98 Validate Binary Search Tree Medium C C++
101 Symmetric Tree Easy C C++
102 Binary Tree Level Order Traversal Medium C C++
108 Convert Sorted Array to Binary Search Tree Easy C C++

Sorting and Searching

ID Title Difficulty Blog
88 Merge Sorted Array Easy C C++
278 First Bad Version Easy C C++

Dynamic Programming

ID Title Difficulty Blog
70 Climbing Stairs Easy C C++
121 Best Time to Buy and Sell Stock Easy C C++
53 Maximum Subarray Easy C C++
198 House Robber Easy C C++

Design

ID Title Difficulty Blog
384 Shuffle an Array Medium C C++
155 Min Stack Easy C C++

Math

ID Title Difficulty Blog
412 Fizz Buzz Easy C C++
204 Count Primes Easy C C++
326 Power of Three Easy C C++
102 Roman to Integer Easy C C++

Others

ID Title Difficulty Blog
191 Number of 1 Bits Easy C C++
461 Hamming Distance Easy C C++
190 Reverse Bits Easy C C++
118 Pascal's Triangle Easy C C++
20 Valid Parentheses Easy C C++
268 Missing Number Easy C C++