File tree
301 files changed
+1226
-1226
lines changed- 001. Single Number
- 002. Maximum Depth of Binary Tree
- 003. Same Tree
- 004. Reverse Integer
- 005. Best Time to Buy and Sell Stock II
- 006. Unique Binary Search Trees
- 007. Linked List Cycle
- 008. Binary Tree Inorder Traversal
- 009. Binary Tree Preorder Traversal
- 010. Populating Next Right Pointers in Each Node
- 011. Search Insert Position
- 012. Remove Duplicates from Sorted List
- 013. Climbing Stairs
- 014. Maximum Subarray
- 015. N-Queens II
- 016. Roman to Integer
- 017. Integer to Roman
- 018. Single Number II
- 019. Merge Two Sorted Lists
- 020. Remove Element
- 021. Convert Sorted Array to Binary Search Tree
- 022. Balan 10000 ced Binary Tree
- 023. Swap Nodes in Pairs
- 024. Remove Duplicates from Sorted Array
- 025. Sort Colors
- 026. Merge Sorted Array
- 027. Symmetric Tree
- 028. Gray Code
- 029. Unique Paths
- 030. Plus One
- 031. Generate Parentheses
- 032. Pascal's Triangle
- 033. Container With Most Water
- 034. Permutations
- 035. Rotate Image
- 036. Search a 2D Matrix
- 037. Find Minimum in Rotated Sorted Array
- 038. Minimum Path Sum
- 039. Best Time to Buy and Sell Stock
- 040. Binary Tree Level Order Traversal II
- 041. Search in Rotated Sorted Array II
- 042. Binary Tree Postorder Traversal
- 043. Linked List Cycle II
- 044. Set Matrix Zeroes
- 045. Spiral Matrix II
- 046. Remove Duplicates from Sorted Array II
- 047. Populating Next Right Pointers in Each Node II
- 048. Binary Tree Level Order Traversal
- 049. Path Sum
- 050. Pascal's Triangle II
- 051. Combinations
- 052. Sum Root to Leaf Numbers
- 053. Remove Nth Node from End of List
- 054. Minimum Depth of Binary Tree
- 055. Length of Last Word
- 056. Trapping Rain Water
- 057. Palindrome Number
- 058. Search in Rotated Sorted Array
- 059. Valid Parentheses
- 060. Flatten Binary Tree to Linked List
- 061. Longest Consecutive Sequence
- 062. Unique Paths II
- 063. Subsets
- 064. Valid Sudoku
- 065. Unique Binary Search Trees II
- 066. Convert Sorted List to Binary Search Tree
- 067. Search for a Range
- 068. Jump Game
- 069. Count and Say
- 070. Longest Common Prefix
- 071. Subsets II
- 10000 main.cc
- 072. Partition List
- 073. 3Sum Closest
- 074. Path Sum II
- 075. Combination Sum
- 076. Triangle
- 077. Construct Binary Tree from Inorder and Postorder Traversal
- 078. Binary Tree Zigzag Level Order Traversal
- 079. Construct Binary Tree from Preorder and Inorder Traversal
- 080. Letter Combinations of a Phone Number
- 081. Reverse Linked List II
- 082. Pow(x, n)
- 083. N-Queens
- 084. Gas Station
- 085. Palindrome Partitioning
- 086. Validate Binary Search Tree
- 087. Add Binary
- 088. Edit Distance
- 089. Next Permutation
- 090. Insertion Sort List
- 091. Reverse Nodes in k-Group
- 092. Distinct Subsequences
- 093. Permutations II
- 094. Remove Duplicates from Sorted List II
- 095. Jump Game II
- 096. Combination Sum II
- 097. Anagrams
- 098. Recover Binary Search Tree
- 099. ZigZag Conversion
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
301 files changed
+1226
-1226
lines changedFile renamed without changes.
Lines changed: 13 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 |
| - | |
12 |
| - | |
13 |
| - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + |
Lines changed: 9 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + |
File renamed without changes.
Lines changed: 41 additions & 41 deletions
@@ -1,41 +1,41 @@
1
-#include <iostream>
2
-#include "solution.h"
3
-
4
-// Test Unit
5
-// Create a tree for test
6
-// 1
7
-// / \
8
-// 2 3
9
-// / \ \
10
-// 4 5 6
11
-// / \
12
-// 7 8
13
-// /
14
-// 9
15
-
16
-
17
-int main() {
18
- TreeNode root(1);
19
- TreeNode t2(2);
20
- TreeNode t3(3);
21
- TreeNode t4(4);
22
- TreeNode t5(5);
23
- TreeNode t6(6);
24
- TreeNode t7(7);
25
- TreeNode t8(8);
26
- TreeNode t9(9);
27
-
28
- root.left = &t2;
29
- root.right = &t3;
30
- t2.left = &t4;
31
- t2.right = &t5;
32
- t3.right = &t6;
33
- t4.left = &t7;
34
- t4.right = &t8;
35
- t8.left = &t9;
36
-
37
- Solution s;
38
- std::cout << s.maxDepth(&root) << std::endl;
39
-
40
- return 0;
41
-}
1
+#include <iostream>
2
+#include "solution.h"
3
+
4
+// Test Unit
5
+// Create a tree for test
6
+// 1
7
+// / \
8
+// 2 3
9
+// / \ \
10
+// 4 5 6
11
+// / \
12
+// 7 8
13
+// /
14
+// 9
15
+
16
+
17
+int main() {
18
+ TreeNode root(1);
19
+ TreeNode t2(2);
20
+ TreeNode t3(3);
21
+ TreeNode t4(4);
22
+ TreeNode t5(5);
23
+ TreeNode t6(6);
24
+ TreeNode t7(7);
25
+ TreeNode t8(8);
26
+ TreeNode t9(9);
27
+
28
+ root.left = &t2;
29
+ root.right = &t3;
30
+ t2.left = &t4;
31
+ t2.right = &t5;
32
+ t3.right = &t6;
33
+ t4.left = &t7;
34
+ t4.right = &t8;
35
+ t8.left = &t9;
36
+
37
+ Solution s;
38
+ std::cout << s.maxDepth(&root) << std::endl;
39
+
40
+ return 0;
41
+}
Lines changed: 23 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 |
| - | |
12 |
| - | |
13 |
| - | |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
19 |
| - | |
20 |
| - | |
21 |
| - | |
22 |
| - | |
23 |
| - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + |
File renamed without changes.
Lines changed: 43 additions & 43 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 |
| - | |
12 |
| - | |
13 |
| - | |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
19 |
| - | |
20 |
| - | |
21 |
| - | |
22 |
| - | |
23 |
| - | |
24 |
| - | |
25 |
| - | |
26 |
| - | |
27 |
| - | |
28 |
| - | |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 |
| - | |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + |
Lines changed: 25 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 |
| - | |
12 |
| - | |
13 |
| - | |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
19 |
| - | |
20 |
| - | |
21 |
| - | |
22 |
| - | |
23 |
| - | |
24 |
| - | |
25 |
| - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + |
File renamed without changes.
0 commit comments