leetcode训练日记

( 寒假Flag )

《 STL源码剖析 》

《 编程珠玑 》

《 Effective C++ 》

leetcode 200题


2020.4.15:

Flag已完成,还额外看了不少书

200题没刷完,后面转剑指了

题号 我的时间复杂度 我的空间复杂度 难度
1 O(nlogn)O(nlogn) / O(n)O(n) O(n)O(n) E
2 O(n)O(n) O(1)O(1) M
3 O(n)O(n) O(1)O(1) M
4 O(log(m+n))O(log(m + n)) O(1)O(1) H
5 O(n)O(n) O(n)O(n) M
6 O(n)O(n) O(1)O(1) M
7 O(logn)O(logn) O(1)O(1) E
8 O(n)O(n) O(1)O(1) M
9 O(logn)O(logn) O(logn)O(logn) E
10 O()O() O()O() H
11 O(n)O(n) O(1)O(1) M
12 O(1)O(1) O(1)O(1) M
13 O(n)O(n) O(1)O(1) E
14 O(nm)O(nm) O(1)O(1) E
15 O(n2)O(n^2) O(1)O(1) M
16 O(n2)O(n^2) O(1)O(1) M
17 O(3n)O(3^n) O(n)O(n) M
18 O(n3)O(n^3) O(1)O(1) M
19 O(n)O(n) O(1)O(1) M
20 O(n)O(n) O(n)O(n) E
21 O(n)O(n) O(1)O(1) E
22 O(2n)O(2^n) O(2n)O(2^n) M
23 O(nlogk)O(nlogk) O(logk)O(logk) H
24 O(n)O(n) O(1)O(1) M
25 O()O() O()O() H
26 O(n)O(n) O(1)O(1) E
27 O(n)O(n) O(1)O(1) E
28 O(n+m)O(n+m) O(m)O(m) E
29 O(logn)O(logn) O(1)O(1) M
30 O(n)O(n) O(m)O(m) H
31 O(n)O(n) O(1)O(1) M
32 O()O() O()O() H
33 O()O() O()O() M
34 O()O() O()O() M
35 O()O() O()O() E
36 O(n2)O(n^2) O(n)O(n) M
37 O()O(可以过) O()O() H
38 O(nm)O(nm) O(nm)O(nm) E
39 O()O(可以过) O()O() M
40 O()O(可以过) O()O() M
41 O(n)O(n) O(1)O(1) H
42 O(n)O(n) O(n)O(n) H
43 O(nm)O(nm) O(n+m)O(n+m) M
44 O()O() O()O() H
45 O(n)O(n) O(1)O(1) H
46 O(n!)O(n!) O(n)O(n) M
47 O(n!)O(n!) O(n)O(n) M
48 O(n2)O(n^2) O(1)O(1) M
49 O(nlogn)O(nlogn) O(n)O(n) M
50 O(logn)O(logn) O(1)O(1) M
51 O(n!)O(n!) O(n2)O(n^2) H
52 O(n!)O(n!) O(n2)O(n^2) H
53 O(n)O(n) O(1)O(1) E
54 O(nm)O(nm) O(1)O(1) M
55 O(n)O(n) O(1)O(1) M
56 O(nlogn)O(nlogn) O(1)O(1) M
57 O(n)O(n) O(n)O(n) H
58 O(n)O(n) O(1)O(1) E
59 O(n2)O(n^2) O(1)O(1) M
60 O(n)O(n) O(n)O(n) M
61 O(n)O(n) O(1)O(1) M
62 O(nm)O(nm) O(nm)O(nm) M
63 O(nm)O(nm) O(nm)O(nm) M
64 O(nm)O(nm) O(nm)O(nm) M
65 O(n)O(n) O(1)O(1) H
66 O(n)O(n) O(1)O(1) E
67 O(n+m)O(n+m) O(n+m)O(n+m) E
68 O()O() O()O() H
69 O(logn)O(logn) O(1)O(1) E
70 O(n)O(n) O(1)O(1) E
71 O(n)O(n) O(n)O(n) M
72 O(nm)O(nm) O(nm)O(nm) H
73 O(nm)O(nm) O(1)O(1) M
74 O(logn+logm)O(logn+logm) O(1)O(1) M
75 O(n)O(n) O(1)O(1) M
76 O(n)O(n) O(1)O(1) H
77 O(n!)O(n!) O(k)O(k) M
78 O(2n)O(2^n) O(n)O(n) M
79 O(2k)O(2^k) O(nm)O(nm) M
80 O(n)O(n) O(1)O(1) M
81 O(logn)O(logn) O(1)O(1) M
82 O(n)O(n) O(1)O(1) M
83 O(n)O(n) O(1)O(1) E
84 O(n)O(n) O(n)O(n) H
85 O(n(n+m))O(n(n+m)) O(m)O(m) H
86 O(n)O(n) O(1)O(1) M
87 O()O() O()O() H
88 O(n)O(n) O(1)O(1) E
89 O(2n)O(2^n) O(n2n)O(n2^n) M
90 O(2n)O(2^n) O(n)O(n) M
91 O(n)O(n) O(n)O(n) M
92 O(n)O(n) O(1)O(1) M
93 O()O(可以过) O(1)O(1) M
94 O(n)O(n) O(1)O(1) M
95 O()O(可以过) O(n)O(n) M
96 O(n2)O(n^2) O(n)O(n) M
97 O(nm)O(nm) O(nm)O(nm) H
98 O(n)O(n) O(1)O(1) M
99 O(n)O(n) O(n)O(n) H
100 O(n)O(n) O(n)O(n) E
101 O(n)O(n) O(n)O(n) E
102 O(n)O(n) O(n)O(n) M
103 O(n)O(n) O(n)O(n) M
104 O(n)O(n) O(n)O(n) E
105 O(n)O(n) O(n)O(n) M
106 O(n)O(n) O(n)O(n) M
107 O(n)O(n) O(n)O(n) E
108 O(n)O(n) O(n)O(n) E
109 O(nlogn)O(nlogn) O(n)O(n) M
110 O(n)O(n) O(n)O(n) E
111 O(n)O(n) O(n)O(n) E
112 O(n)O(n) O(n)O(n) E
113 O(n)O(n) O(n)O(n) M
114 O(n)O(n) O(n)O(n) M
115 O(nm)O(nm) O(nm)O(nm) H
116 O(n)O(n) O(n)O(n) M
117 O(n)O(n) O(n)O(n) M
118 O(n2)O(n^2) O(1)O(1) E
119 O(n)O(n) O(k)O(k) E
120 O(n2)O(n^2) O(n)O(n) M
121 O(n)O(n) O(1)O(1) E
122 O(n)O(n) O(1)O(1) E
123 O(n)O(n) O(n)O(n) H
124 O(n)O(n) O(n)O(n) H
125 O(n)O(n) O(1)O(1) E
126 O()O() O()O() H
127 O()O() O()O() M
128 O(n)/O(nlog)/O(nloglog)O(n) / O(nlog) / O(nloglog) O(n)O(n) H
129 O(n)O(n) O(n)O(n) M
130 O(nm)O(nm) O(nm)O(nm) M
131 O(nn!)O(nn!) O(n)O(n)
132 O(n2)O(n^2) O(n)O(n)
133 O(n+e)O(n+e) O(n)O(n)
134 O(n)O(n) O(1)O(1)
135 O(n)O(n) O(n)O(n)
136 O(n)O(n) O(1)O(1)
137 O(n)O(n) O(1)O(1)
138 O()O() O()O()
139 O(n2)O(n^2) O(n)O(n)
140 O(n2+n!)O(n^2 + n!) O(n)O(n)
141 O(n)O(n) O(1)O(1)
142 O(n)O(n) O(1)O(1)
143 O(n)O(n) O(1)O(1)
144 O(n)O(n) O(n)O(n)
145 O(n)O(n) O(n)O(n)
146 O()O() O()O()
147 O(n2)O(n^2) O(1)O(1)
148 O(nlogn)O(nlogn) O(1)O(1)
149 O(n2)O(n^2) O(n)O(n)
150 O(n)O(n) O(n)O(n)
151 O(n)O(n) O(n)O(n)
152 O(n)O(n) O(1)O(1)
153 O(logn)O(logn) O(1)O(1)
154 O(logn)O(logn) O(1)O(1)
155 O(1)O(1) O(n)O(n)
156 O()O() O()O()
157 O()O() O()O()
158 O()O() O()O()
159 O()O() O()O()
160 O(n)O(n) O(1)O(1)
161 O()O() O()O()
162 O(logn)O(logn) O(1)O(1)
163 O()O() O()O()
164 O(n)O(n) O(n)O(n)
165 O(n)O(n) O(1)O(1)
166 O(1)O(1) O(n)O(n)
167 O(n)O(n) O(1)O(1)
168 O(logn)O(logn) O(1)O(1)
169 O(n)O(n) O(1)O(1)
170 O()O() O()O()
171 O()O() O()O()
172 O()O() O()O()
173 O()O() O()O()
174 O()O() O()O()
175 O()O() O()O()
176 O()O() O()O()
177 O()O() O()O()
178 O()O() O()O()
179 O()O() O()O()
180 O()O() O()O()
181 O()O() O()O()
182 O()O() O()O()
183 O()O() O()O()
184 O()O() O()O()
185 O()O() O()O()
186 O()O() O()O()
187 O()O() O()O()
188 O(nk)O(nk) O(nk)O(nk)
189 O()O() O()O()
190 O()O() O()O()
191 O()O() O()O()
192 O()O() O()O()
193 O()O() O()O()
194 O()O() O()O()
195 O()O() O()O()
196 O()O() O()O()
197 O()O() O()O()
198 O()O() O()O()
199 O()O() O()O()
200 O()O() O()O()