-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinary-search.json
528 lines (527 loc) · 15 KB
/
binary-search.json
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
[
{
"acceptance" : "29.6%",
"difficulty" : "Hard",
"title" : "Median of Two Sorted Arrays",
"iD" : "4",
"url" : "https:\/\/leetcode.com\/problems\/median-of-two-sorted-arrays"
},
{
"acceptance" : "16.4%",
"difficulty" : "Medium",
"title" : "Divide Two Integers",
"iD" : "29",
"url" : "https:\/\/leetcode.com\/problems\/divide-two-integers"
},
{
"acceptance" : "34.5%",
"difficulty" : "Medium",
"title" : "Search in Rotated Sorted Array",
"iD" : "33",
"url" : "https:\/\/leetcode.com\/problems\/search-in-rotated-sorted-array"
},
{
"acceptance" : "36.1%",
"difficulty" : "Medium",
"title" : "Find First and Last Position of Element in Sorted Array",
"iD" : "34",
"url" : "https:\/\/leetcode.com\/problems\/find-first-and-last-position-of-element-in-sorted-array"
},
{
"acceptance" : "42.6%",
"difficulty" : "Easy",
"title" : "Search Insert Position",
"iD" : "35",
"url" : "https:\/\/leetcode.com\/problems\/search-insert-position"
},
{
"acceptance" : "30.3%",
"difficulty" : "Medium",
"title" : "Pow(x, n)",
"iD" : "50",
"url" : "https:\/\/leetcode.com\/problems\/powx-n"
},
{
"acceptance" : "33.9%",
"difficulty" : "Easy",
"title" : "Sqrt(x)",
"iD" : "69",
"url" : "https:\/\/leetcode.com\/problems\/sqrtx"
},
{
"acceptance" : "36.5%",
"difficulty" : "Medium",
"title" : "Search a 2D Matrix",
"iD" : "74",
"url" : "https:\/\/leetcode.com\/problems\/search-a-2d-matrix"
},
{
"acceptance" : "33.0%",
"difficulty" : "Medium",
"title" : "Search in Rotated Sorted Array II",
"iD" : "81",
"url" : "https:\/\/leetcode.com\/problems\/search-in-rotated-sorted-array-ii"
},
{
"acceptance" : "45.1%",
"difficulty" : "Medium",
"title" : "Find Minimum in Rotated Sorted Array",
"iD" : "153",
"url" : "https:\/\/leetcode.com\/problems\/find-minimum-in-rotated-sorted-array"
},
{
"acceptance" : "41.6%",
"difficulty" : "Hard",
"title" : "Find Minimum in Rotated Sorted Array II",
"iD" : "154",
"url" : "https:\/\/leetcode.com\/problems\/find-minimum-in-rotated-sorted-array-ii"
},
{
"acceptance" : "43.3%",
"difficulty" : "Medium",
"title" : "Find Peak Element",
"iD" : "162",
"url" : "https:\/\/leetcode.com\/problems\/find-peak-element"
},
{
"acceptance" : "54.0%",
"difficulty" : "Easy",
"title" : "Two Sum II - Input array is sorted",
"iD" : "167",
"url" : "https:\/\/leetcode.com\/problems\/two-sum-ii-input-array-is-sorted"
},
{
"acceptance" : "32.3%",
"difficulty" : "Hard",
"title" : "Dungeon Game",
"iD" : "174",
"url" : "https:\/\/leetcode.com\/problems\/dungeon-game"
},
{
"acceptance" : "38.1%",
"difficulty" : "Medium",
"title" : "Minimum Size Subarray Sum",
"iD" : "209",
"url" : "https:\/\/leetcode.com\/problems\/minimum-size-subarray-sum"
},
{
"acceptance" : "46.7%",
"difficulty" : "Medium",
"title" : "Count Complete Tree Nodes",
"iD" : "222",
"url" : "https:\/\/leetcode.com\/problems\/count-complete-tree-nodes"
},
{
"acceptance" : "60.2%",
"difficulty" : "Medium",
"title" : "Kth Smallest Element in a BST",
"iD" : "230",
"url" : "https:\/\/leetcode.com\/problems\/kth-smallest-element-in-a-bst"
},
{
"acceptance" : "43.1%",
"difficulty" : "Medium",
"title" : "Search a 2D Matrix II",
"iD" : "240",
"url" : "https:\/\/leetcode.com\/problems\/search-a-2d-matrix-ii"
},
{
"acceptance" : "35.9%",
"difficulty" : "Medium",
"title" : "H-Index II",
"iD" : "275",
"url" : "https:\/\/leetcode.com\/problems\/h-index-ii"
},
{
"acceptance" : "35.7%",
"difficulty" : "Easy",
"title" : "First Bad Version",
"iD" : "278",
"url" : "https:\/\/leetcode.com\/problems\/first-bad-version"
},
{
"acceptance" : "55.5%",
"difficulty" : "Medium",
"title" : "Find the Duplicate Number",
"iD" : "287",
"url" : "https:\/\/leetcode.com\/problems\/find-the-duplicate-number"
},
{
"acceptance" : "42.6%",
"difficulty" : "Medium",
"title" : "Longest Increasing Subsequence",
"iD" : "300",
"url" : "https:\/\/leetcode.com\/problems\/longest-increasing-subsequence"
},
{
"acceptance" : "41.5%",
"difficulty" : "Hard",
"title" : "Count of Smaller Numbers After Self",
"iD" : "315",
"url" : "https:\/\/leetcode.com\/problems\/count-of-smaller-numbers-after-self"
},
{
"acceptance" : "35.1%",
"difficulty" : "Hard",
"title" : "Count of Range Sum",
"iD" : "327",
"url" : "https:\/\/leetcode.com\/problems\/count-of-range-sum"
},
{
"acceptance" : "62.4%",
"difficulty" : "Easy",
"title" : "Intersection of Two Arrays",
"iD" : "349",
"url" : "https:\/\/leetcode.com\/problems\/intersection-of-two-arrays"
},
{
"acceptance" : "51.3%",
"difficulty" : "Easy",
"title" : "Intersection of Two Arrays II",
"iD" : "350",
"url" : "https:\/\/leetcode.com\/problems\/intersection-of-two-arrays-ii"
},
{
"acceptance" : "47.3%",
"difficulty" : "Hard",
"title" : "Data Stream as Disjoint Intervals",
"iD" : "352",
"url" : "https:\/\/leetcode.com\/problems\/data-stream-as-disjoint-intervals"
},
{
"acceptance" : "35.6%",
"difficulty" : "Hard",
"title" : "Russian Doll Envelopes",
"iD" : "354",
"url" : "https:\/\/leetcode.com\/problems\/russian-doll-envelopes"
},
{
"acceptance" : "37.3%",
"difficulty" : "Hard",
"title" : "Max Sum of Rectangle No Larger Than K",
"iD" : "363",
"url" : "https:\/\/leetcode.com\/problems\/max-sum-of-rectangle-no-larger-than-k"
},
{
"acceptance" : "41.7%",
"difficulty" : "Easy",
"title" : "Valid Perfect Square",
"iD" : "367",
"url" : "https:\/\/leetcode.com\/problems\/valid-perfect-square"
},
{
"acceptance" : "43.0%",
"difficulty" : "Easy",
"title" : "Guess Number Higher or Lower",
"iD" : "374",
"url" : "https:\/\/leetcode.com\/problems\/guess-number-higher-or-lower"
},
{
"acceptance" : "54.3%",
"difficulty" : "Medium",
"title" : "Kth Smallest Element in a Sorted Matrix",
"iD" : "378",
"url" : "https:\/\/leetcode.com\/problems\/kth-smallest-element-in-a-sorted-matrix"
},
{
"acceptance" : "49.2%",
"difficulty" : "Easy",
"title" : "Is Subsequence",
"iD" : "392",
"url" : "https:\/\/leetcode.com\/problems\/is-subsequence"
},
{
"acceptance" : "44.5%",
"difficulty" : "Hard",
"title" : "Split Array Largest Sum",
"iD" : "410",
"url" : "https:\/\/leetcode.com\/problems\/split-array-largest-sum"
},
{
"acceptance" : "45.4%",
"difficulty" : "Medium",
"title" : "Find Right Interval",
"iD" : "436",
"url" : "https:\/\/leetcode.com\/problems\/find-right-interval"
},
{
"acceptance" : "41.8%",
"difficulty" : "Easy",
"title" : "Arranging Coins",
"iD" : "441",
"url" : "https:\/\/leetcode.com\/problems\/arranging-coins"
},
{
"acceptance" : "53.1%",
"difficulty" : "Medium",
"title" : "4Sum II",
"iD" : "454",
"url" : "https:\/\/leetcode.com\/problems\/4sum-ii"
},
{
"acceptance" : "33.1%",
"difficulty" : "Easy",
"title" : "Heaters",
"iD" : "475",
"url" : "https:\/\/leetcode.com\/problems\/heaters"
},
{
"acceptance" : "35.7%",
"difficulty" : "Hard",
"title" : "Smallest Good Base",
"iD" : "483",
"url" : "https:\/\/leetcode.com\/problems\/smallest-good-base"
},
{
"acceptance" : "25.2%",
"difficulty" : "Hard",
"title" : "Reverse Pairs",
"iD" : "493",
"url" : "https:\/\/leetcode.com\/problems\/reverse-pairs"
},
{
"acceptance" : "40.9%",
"difficulty" : "Medium",
"title" : "Find K Closest Elements",
"iD" : "658",
"url" : "https:\/\/leetcode.com\/problems\/find-k-closest-elements"
},
{
"acceptance" : "45.6%",
"difficulty" : "Hard",
"title" : "Kth Smallest Number in Multiplication Table",
"iD" : "668",
"url" : "https:\/\/leetcode.com\/problems\/kth-smallest-number-in-multiplication-table"
},
{
"acceptance" : "49.3%",
"difficulty" : "Medium",
"title" : "Maximum Length of Repeated Subarray",
"iD" : "718",
"url" : "https:\/\/leetcode.com\/problems\/maximum-length-of-repeated-subarray"
},
{
"acceptance" : "31.5%",
"difficulty" : "Hard",
"title" : "Find K-th Smallest Pair Distance",
"iD" : "719",
"url" : "https:\/\/leetcode.com\/problems\/find-k-th-smallest-pair-distance"
},
{
"acceptance" : "45.4%",
"difficulty" : "Easy",
"title" : "Find Smallest Letter Greater Than Target",
"iD" : "744",
"url" : "https:\/\/leetcode.com\/problems\/find-smallest-letter-greater-than-target"
},
{
"acceptance" : "52.1%",
"difficulty" : "Easy",
"title" : "Binary Search",
"iD" : "704",
"url" : "https:\/\/leetcode.com\/problems\/binary-search"
},
{
"acceptance" : "53.0%",
"difficulty" : "Hard",
"title" : "Swim in Rising Water",
"iD" : "778",
"url" : "https:\/\/leetcode.com\/problems\/swim-in-rising-water"
},
{
"acceptance" : "41.0%",
"difficulty" : "Hard",
"title" : "K-th Smallest Prime Fraction",
"iD" : "786",
"url" : "https:\/\/leetcode.com\/problems\/k-th-smallest-prime-fraction"
},
{
"acceptance" : "40.3%",
"difficulty" : "Hard",
"title" : "Preimage Size of Factorial Zeroes Function",
"iD" : "793",
"url" : "https:\/\/leetcode.com\/problems\/preimage-size-of-factorial-zeroes-function"
},
{
"acceptance" : "71.6%",
"difficulty" : "Easy",
"title" : "Peak Index in a Mountain Array",
"iD" : "852",
"url" : "https:\/\/leetcode.com\/problems\/peak-index-in-a-mountain-array"
},
{
"acceptance" : "24.6%",
"difficulty" : "Hard",
"title" : "Shortest Subarray with Sum at Least K",
"iD" : "862",
"url" : "https:\/\/leetcode.com\/problems\/shortest-subarray-with-sum-at-least-k"
},
{
"acceptance" : "32.4%",
"difficulty" : "Hard",
"title" : "Random Pick with Blacklist",
"iD" : "710",
"url" : "https:\/\/leetcode.com\/problems\/random-pick-with-blacklist"
},
{
"acceptance" : "52.1%",
"difficulty" : "Medium",
"title" : "Koko Eating Bananas",
"iD" : "875",
"url" : "https:\/\/leetcode.com\/problems\/koko-eating-bananas"
},
{
"acceptance" : "28.4%",
"difficulty" : "Hard",
"title" : "Nth Magical Number",
"iD" : "878",
"url" : "https:\/\/leetcode.com\/problems\/nth-magical-number"
},
{
"acceptance" : "43.9%",
"difficulty" : "Medium",
"title" : "Random Pick with Weight",
"iD" : "528",
"url" : "https:\/\/leetcode.com\/problems\/random-pick-with-weight"
},
{
"acceptance" : "37.8%",
"difficulty" : "Medium",
"title" : "Random Point in Non-overlapping Rectangles",
"iD" : "497",
"url" : "https:\/\/leetcode.com\/problems\/random-point-in-non-overlapping-rectangles"
},
{
"acceptance" : "27.0%",
"difficulty" : "Hard",
"title" : "Super Egg Drop",
"iD" : "887",
"url" : "https:\/\/leetcode.com\/problems\/super-egg-drop"
},
{
"acceptance" : "50.4%",
"difficulty" : "Medium",
"title" : "Online Election",
"iD" : "911",
"url" : "https:\/\/leetcode.com\/problems\/online-election"
},
{
"acceptance" : "33.6%",
"difficulty" : "Hard",
"title" : "Three Equal Parts",
"iD" : "927",
"url" : "https:\/\/leetcode.com\/problems\/three-equal-parts"
},
{
"acceptance" : "53.1%",
"difficulty" : "Medium",
"title" : "Time Based Key-Value Store",
"iD" : "981",
"url" : "https:\/\/leetcode.com\/problems\/time-based-key-value-store"
},
{
"acceptance" : "58.1%",
"difficulty" : "Medium",
"title" : "Capacity To Ship Packages Within D Days",
"iD" : "1011",
"url" : "https:\/\/leetcode.com\/problems\/capacity-to-ship-packages-within-d-days"
},
{
"acceptance" : "32.0%",
"difficulty" : "Hard",
"title" : "Longest Duplicate Substring",
"iD" : "1044",
"url" : "https:\/\/leetcode.com\/problems\/longest-duplicate-substring"
},
{
"acceptance" : "35.7%",
"difficulty" : "Hard",
"title" : "Find in Mountain Array",
"iD" : "1095",
"url" : "https:\/\/leetcode.com\/problems\/find-in-mountain-array"
},
{
"acceptance" : "70.4%",
"difficulty" : "Medium",
"title" : "Maximum Nesting Depth of Two Valid Parentheses Strings",
"iD" : "1111",
"url" : "https:\/\/leetcode.com\/problems\/maximum-nesting-depth-of-two-valid-parentheses-strings"
},
{
"acceptance" : "44.2%",
"difficulty" : "Medium",
"title" : "Sum of Mutated Array Closest to Target",
"iD" : "1300",
"url" : "https:\/\/leetcode.com\/problems\/sum-of-mutated-array-closest-to-target"
},
{
"acceptance" : "38.9%",
"difficulty" : "Hard",
"title" : "Online Majority Element In Subarray",
"iD" : "1157",
"url" : "https:\/\/leetcode.com\/problems\/online-majority-element-in-subarray"
},
{
"acceptance" : "25.9%",
"difficulty" : "Medium",
"title" : "Ugly Number III",
"iD" : "1201",
"url" : "https:\/\/leetcode.com\/problems\/ugly-number-iii"
},
{
"acceptance" : "44.1%",
"difficulty" : "Hard",
"title" : "Maximum Profit in Job Scheduling",
"iD" : "1235",
"url" : "https:\/\/leetcode.com\/problems\/maximum-profit-in-job-scheduling"
},
{
"acceptance" : "69.6%",
"difficulty" : "Easy",
"title" : "Find Positive Integer Solution for a Given Equation",
"iD" : "1237",
"url" : "https:\/\/leetcode.com\/problems\/find-positive-integer-solution-for-a-given-equation"
},
{
"acceptance" : "47.6%",
"difficulty" : "Medium",
"title" : "Find the Smallest Divisor Given a Threshold",
"iD" : "1283",
"url" : "https:\/\/leetcode.com\/problems\/find-the-smallest-divisor-given-a-threshold"
},
{
"acceptance" : "48.5%",
"difficulty" : "Medium",
"title" : "Maximum Side Length of a Square with Sum Less than or Equal to Threshold",
"iD" : "1292",
"url" : "https:\/\/leetcode.com\/problems\/maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold"
},
{
"acceptance" : "68.7%",
"difficulty" : "Easy",
"title" : "The K Weakest Rows in a Matrix",
"iD" : "1337",
"url" : "https:\/\/leetcode.com\/problems\/the-k-weakest-rows-in-a-matrix"
},
{
"acceptance" : "76.6%",
"difficulty" : "Easy",
"title" : "Count Negative Numbers in a Sorted Matrix",
"iD" : "1351",
"url" : "https:\/\/leetcode.com\/problems\/count-negative-numbers-in-a-sorted-matrix"
},
{
"acceptance" : "45.6%",
"difficulty" : "Medium",
"title" : "Minimum Number of Days to Make m Bouquets",
"iD" : "1482",
"url" : "https:\/\/leetcode.com\/problems\/minimum-number-of-days-to-make-m-bouquets"
},
{
"acceptance" : "43.3%",
"difficulty" : "Hard",
"title" : "Find a Value of a Mysterious Function Closest to Target",
"iD" : "1521",
"url" : "https:\/\/leetcode.com\/problems\/find-a-value-of-a-mysterious-function-closest-to-target"
}
]