You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-32
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ Coding Questions
15
15
-[ ][Graph](#graph)
16
16
-[ ][Sortiing and Search](#sortsearch)
17
17
-[ ][Dynamic Programming](#dp)
18
+
-[ ][Other](#other)
18
19
-[ ][Special Topics](#st)
19
20
20
21
###[[⬆]](#toc) <aname='stat'>Statement:</a>
@@ -25,9 +26,9 @@ difficult, and the special topics include some advanced ones.
25
26
26
27
Most code style follows [Google C++ Style Guide](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml).
27
28
28
-
Total Number (not including the problem in the special topics) of Problems: about 202 (142 done).
29
+
Total Number (not including the problem in the special topics) of Problems: about 201 (142 done).
29
30
30
-
Although I try to execute every program, bugs may still exist because the test cases are not enough, welcome to find bugs.
31
+
Although I try to execute every program, bugs may still exist because I didn't run enough tests, welcome to find bugs.
31
32
The solution may not be optimal, welcome to give your better solution. You can send the corresponding pull request.
32
33
33
34
By default, the time complexity is the worst time and the space complexity doesn't include the stack space.
@@ -57,19 +58,34 @@ By default, the time complexity is the worst time and the space complexity doesn
57
58
* Find independent parts in an array
58
59
* Find the longest consecutive increasing subarray in a grid
59
60
*[Calculate the rotation distance for a sorted rotated array](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Array/Rotatearraydistance.cpp)
*[Find elements in first array but not in second array](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Array/Find%20none%20duplicate%20elements%20in%20two%20arrays.cpp)
63
+
*[Find the maximal item A[i], such that A[i]=A[x]+A[y] in an array](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Array/Find%20the%20max%20item%20A%5Bi%5D,%20such%20that%20A%5Bi%5D=A%5Bx%5D+A%5By%5D.cpp)
64
+
*[Length of first subarray that sums to zero](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Array/Length%20of%20First%20continuous%20subarray%20that%20sums%20to%200.cpp)
65
+
*[Stable 2 way partition](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Array/Stable%202%20way%20partition.cpp)
66
+
* Water flow path
67
+
* Form an ascending sequence by removing elements
68
+
* Celebrity problem
69
+
* Matrix Region Sum
70
+
* Recover the queue
71
+
* Find a rectangle with four corners 1
61
72
62
73
--
63
74
####[[⬆]](#toc) <aname='str'>String:</a>
64
75
65
76
*[Given a string, print out the chars with maximal number of consecutive counts](https://github.com/checkcheckzz/coding-problems/blob/master/problem/String/Chars%20with%20maximal%20number%20of%20consecutive%20counts.cpp)
66
77
*[Generate parentheses with different types](https://github.com/checkcheckzz/coding-problems/blob/master/problem/String/GenerateParentheseswithdiffkinds.cpp)
*[String of digits, insert addition operator in between to make sum to be a value](https://github.com/checkcheckzz/coding-problems/blob/master/problem/String/Makesum.cpp)
*[Insert into a Cyclic Sorted List](https://github.com/checkcheckzz/coding-problems/blob/master/problem/LinkedList/Insert%20into%20a%20Cyclic%20Sorted%20List.cpp)
87
+
*[Given linked list as a-x-b-y-c-z, output it as a-b-c-z-y-x](https://github.com/checkcheckzz/coding-problems/blob/master/problem/LinkedList/Reversealternatelist.cpp)
88
+
* Flatten a list
73
89
74
90
--
75
91
####[[⬆]](#toc) <aname='heap'>Heap:</a>
@@ -97,54 +113,45 @@ By default, the time complexity is the worst time and the space complexity doesn
97
113
--
98
114
####[[⬆]](#toc) <aname='graph'>Graph:</a>
99
115
116
+
*[Traversal a Grid](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Graph/Traversalgrid.cpp)
117
+
*[How many carrots can the rabbit eat](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Graph/How%20many%20carrots%20can%20the%20rabbit%20eat.cpp)
118
+
*[Number of closed rectangles in a matrix](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Graph/Numberclosedrectangles.cpp)
119
+
*[Valid whether a graph exists](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Graph/Graph%20exists.cpp)
120
+
* Calculate the distance from each empty room to nearest guard
####[[⬆]](#toc) <aname='sortsearch'>Sorting and Search:</a>
102
125
103
126
*[Find the smallest missing number](https://github.com/checkcheckzz/coding-problems/blob/master/problem/SortSearch/Smallestmissingnumber.cpp)
104
127
* Kth element in two sorted arrays
105
128
*[Find the minimal number in a given left turned array](https://github.com/checkcheckzz/coding-problems/blob/master/problem/SortSearch/Minimalelementinleftsortedarray.cpp)
106
129
*[Find first target in a sorted array with duplicates](https://github.com/checkcheckzz/coding-problems/blob/master/problem/SortSearch/Find%201st%20one%20in%20large%20duplicated%20sorted%20array.cpp)
*[Find elements in first array but not in second array](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Find%20none%20duplicate%20elements%20in%20two%20arrays.cpp)
*[Find the maximal item A[i], such that A[i]=A[x]+A[y] in an array](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Find%20the%20max%20item%20A%5Bi%5D,%20such%20that%20A%5Bi%5D=A%5Bx%5D+A%5By%5D.cpp)
122
144
*[Implement memmove and memcopy](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Implement%20memmove%20and%20memcopy.cpp)
123
-
*[Insert into a Cyclic Sorted List](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Insert%20into%20a%20Cyclic%20Sorted%20List.cpp)
124
-
*[Length of first subarray that sums to zero](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Length%20of%20First%20continuous%20subarray%20that%20sums%20to%200.cpp)
*[Given linked list as a-x-b-y-c-z, output it as a-b-c-z-y-x](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Reversealternatelist.cpp)
130
-
*[String of digits, insert addition operator in between to make sum to be a value](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Makesum.cpp)
*[Traversal a Grid](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Traversalgrid.cpp)
143
-
*[How many carrots can the rabbit eat](https://github.com/checkcheckzz/coding-problems/blob/master/problem/How%20many%20carrots%20can%20the%20rabbit%20eat.cpp)
144
-
*[Number of closed rectangles in a matrix](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Numberclosedrectangles.cpp)
145
-
*[Valid whether a graph exists](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Graph%20exists.cpp)
146
-
* Calculate the distance from each empty room to nearest guard
*[Heapify a binary tree](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Heapify%20a%20binary%20tree.cpp)
150
157
*[Immediate right neighbor of given node (parent links, no root) in binary tree](https://github.com/checkcheckzz/coding-problems/blob/master/problem/Immediate%20right%20neighbor.cpp)
0 commit comments