dsap-cli 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dsap/__init__.py +21 -0
- dsap/__main__.py +9 -0
- dsap/cli.py +618 -0
- dsap/config.py +158 -0
- dsap/data/blind75.yaml +405 -0
- dsap/data/grind75.yaml +401 -0
- dsap/data/neetcode150.yaml +796 -0
- dsap/database.py +774 -0
- dsap/models.py +225 -0
- dsap/problem_sets.py +195 -0
- dsap/py.typed +0 -0
- dsap/sm2.py +521 -0
- dsap/ui.py +445 -0
- dsap_cli-0.1.0.dist-info/METADATA +287 -0
- dsap_cli-0.1.0.dist-info/RECORD +18 -0
- dsap_cli-0.1.0.dist-info/WHEEL +4 -0
- dsap_cli-0.1.0.dist-info/entry_points.txt +2 -0
- dsap_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
dsap/data/grind75.yaml
ADDED
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
# Grind 75 - Curated LeetCode Problems for Coding Interviews
|
|
2
|
+
# Created by Yangshun Tay (https://www.techinterviewhandbook.org/grind75)
|
|
3
|
+
# Organized by week with estimated time per problem
|
|
4
|
+
|
|
5
|
+
metadata:
|
|
6
|
+
name: "Grind 75"
|
|
7
|
+
description: "A flexible 75-question study plan organized by week"
|
|
8
|
+
source: "Tech Interview Handbook"
|
|
9
|
+
total_problems: 75
|
|
10
|
+
|
|
11
|
+
categories:
|
|
12
|
+
- name: "Week 1"
|
|
13
|
+
problems:
|
|
14
|
+
- title: "Two Sum"
|
|
15
|
+
url: "https://leetcode.com/problems/two-sum/"
|
|
16
|
+
difficulty: "Easy"
|
|
17
|
+
tags: ["array", "hash-table"]
|
|
18
|
+
|
|
19
|
+
- title: "Valid Parentheses"
|
|
20
|
+
url: "https://leetcode.com/problems/valid-parentheses/"
|
|
21
|
+
difficulty: "Easy"
|
|
22
|
+
tags: ["string", "stack"]
|
|
23
|
+
|
|
24
|
+
- title: "Merge Two Sorted Lists"
|
|
25
|
+
url: "https://leetcode.com/problems/merge-two-sorted-lists/"
|
|
26
|
+
difficulty: "Easy"
|
|
27
|
+
tags: ["linked-list", "recursion"]
|
|
28
|
+
|
|
29
|
+
- title: "Best Time to Buy and Sell Stock"
|
|
30
|
+
url: "https://leetcode.com/problems/best-time-to-buy-and-sell-stock/"
|
|
31
|
+
difficulty: "Easy"
|
|
32
|
+
tags: ["array", "dynamic-programming"]
|
|
33
|
+
|
|
34
|
+
- title: "Valid Palindrome"
|
|
35
|
+
url: "https://leetcode.com/problems/valid-palindrome/"
|
|
36
|
+
difficulty: "Easy"
|
|
37
|
+
tags: ["string", "two-pointers"]
|
|
38
|
+
|
|
39
|
+
- title: "Invert Binary Tree"
|
|
40
|
+
url: "https://leetcode.com/problems/invert-binary-tree/"
|
|
41
|
+
difficulty: "Easy"
|
|
42
|
+
tags: ["tree", "dfs", "bfs"]
|
|
43
|
+
|
|
44
|
+
- title: "Valid Anagram"
|
|
45
|
+
url: "https://leetcode.com/problems/valid-anagram/"
|
|
46
|
+
difficulty: "Easy"
|
|
47
|
+
tags: ["string", "hash-table", "sorting"]
|
|
48
|
+
|
|
49
|
+
- title: "Binary Search"
|
|
50
|
+
url: "https://leetcode.com/problems/binary-search/"
|
|
51
|
+
difficulty: "Easy"
|
|
52
|
+
tags: ["array", "binary-search"]
|
|
53
|
+
|
|
54
|
+
- title: "Flood Fill"
|
|
55
|
+
url: "https://leetcode.com/problems/flood-fill/"
|
|
56
|
+
difficulty: "Easy"
|
|
57
|
+
tags: ["array", "dfs", "bfs", "matrix"]
|
|
58
|
+
|
|
59
|
+
- title: "Lowest Common Ancestor of a Binary Search Tree"
|
|
60
|
+
url: "https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/"
|
|
61
|
+
difficulty: "Medium"
|
|
62
|
+
tags: ["tree", "dfs", "bst"]
|
|
63
|
+
|
|
64
|
+
- title: "Balanced Binary Tree"
|
|
65
|
+
url: "https://leetcode.com/problems/balanced-binary-tree/"
|
|
66
|
+
difficulty: "Easy"
|
|
67
|
+
tags: ["tree", "dfs"]
|
|
68
|
+
|
|
69
|
+
- title: "Linked List Cycle"
|
|
70
|
+
url: "https://leetcode.com/problems/linked-list-cycle/"
|
|
71
|
+
difficulty: "Easy"
|
|
72
|
+
tags: ["linked-list", "two-pointers"]
|
|
73
|
+
|
|
74
|
+
- title: "Implement Queue using Stacks"
|
|
75
|
+
url: "https://leetcode.com/problems/implement-queue-using-stacks/"
|
|
76
|
+
difficulty: "Easy"
|
|
77
|
+
tags: ["stack", "design", "queue"]
|
|
78
|
+
|
|
79
|
+
- name: "Week 2"
|
|
80
|
+
problems:
|
|
81
|
+
- title: "First Bad Version"
|
|
82
|
+
url: "https://leetcode.com/problems/first-bad-version/"
|
|
83
|
+
difficulty: "Easy"
|
|
84
|
+
tags: ["binary-search"]
|
|
85
|
+
|
|
86
|
+
- title: "Ransom Note"
|
|
87
|
+
url: "https://leetcode.com/problems/ransom-note/"
|
|
88
|
+
difficulty: "Easy"
|
|
89
|
+
tags: ["hash-table", "string"]
|
|
90
|
+
|
|
91
|
+
- title: "Climbing Stairs"
|
|
92
|
+
url: "https://leetcode.com/problems/climbing-stairs/"
|
|
93
|
+
difficulty: "Easy"
|
|
94
|
+
tags: ["dynamic-programming"]
|
|
95
|
+
|
|
96
|
+
- title: "Longest Palindrome"
|
|
97
|
+
url: "https://leetcode.com/problems/longest-palindrome/"
|
|
98
|
+
difficulty: "Easy"
|
|
99
|
+
tags: ["hash-table", "string", "greedy"]
|
|
100
|
+
|
|
101
|
+
- title: "Reverse Linked List"
|
|
102
|
+
url: "https://leetcode.com/problems/reverse-linked-list/"
|
|
103
|
+
difficulty: "Easy"
|
|
104
|
+
tags: ["linked-list"]
|
|
105
|
+
|
|
106
|
+
- title: "Majority Element"
|
|
107
|
+
url: "https://leetcode.com/problems/majority-element/"
|
|
108
|
+
difficulty: "Easy"
|
|
109
|
+
tags: ["array", "hash-table", "sorting"]
|
|
110
|
+
|
|
111
|
+
- title: "Add Binary"
|
|
112
|
+
url: "https://leetcode.com/problems/add-binary/"
|
|
113
|
+
difficulty: "Easy"
|
|
114
|
+
tags: ["math", "string", "bit-manipulation"]
|
|
115
|
+
|
|
116
|
+
- title: "Diameter of Binary Tree"
|
|
117
|
+
url: "https://leetcode.com/problems/diameter-of-binary-tree/"
|
|
118
|
+
difficulty: "Easy"
|
|
119
|
+
tags: ["tree", "dfs"]
|
|
120
|
+
|
|
121
|
+
- title: "Middle of the Linked List"
|
|
122
|
+
url: "https://leetcode.com/problems/middle-of-the-linked-list/"
|
|
123
|
+
difficulty: "Easy"
|
|
124
|
+
tags: ["linked-list", "two-pointers"]
|
|
125
|
+
|
|
126
|
+
- title: "Maximum Depth of Binary Tree"
|
|
127
|
+
url: "https://leetcode.com/problems/maximum-depth-of-binary-tree/"
|
|
128
|
+
difficulty: "Easy"
|
|
129
|
+
tags: ["tree", "dfs", "bfs"]
|
|
130
|
+
|
|
131
|
+
- title: "Contains Duplicate"
|
|
132
|
+
url: "https://leetcode.com/problems/contains-duplicate/"
|
|
133
|
+
difficulty: "Easy"
|
|
134
|
+
tags: ["array", "hash-table"]
|
|
135
|
+
|
|
136
|
+
- title: "Maximum Subarray"
|
|
137
|
+
url: "https://leetcode.com/problems/maximum-subarray/"
|
|
138
|
+
difficulty: "Medium"
|
|
139
|
+
tags: ["array", "dynamic-programming"]
|
|
140
|
+
|
|
141
|
+
- name: "Week 3"
|
|
142
|
+
problems:
|
|
143
|
+
- title: "Insert Interval"
|
|
144
|
+
url: "https://leetcode.com/problems/insert-interval/"
|
|
145
|
+
difficulty: "Medium"
|
|
146
|
+
tags: ["array", "interval"]
|
|
147
|
+
|
|
148
|
+
- title: "01 Matrix"
|
|
149
|
+
url: "https://leetcode.com/problems/01-matrix/"
|
|
150
|
+
difficulty: "Medium"
|
|
151
|
+
tags: ["array", "bfs", "matrix", "dynamic-programming"]
|
|
152
|
+
|
|
153
|
+
- title: "K Closest Points to Origin"
|
|
154
|
+
url: "https://leetcode.com/problems/k-closest-points-to-origin/"
|
|
155
|
+
difficulty: "Medium"
|
|
156
|
+
tags: ["array", "heap", "sorting"]
|
|
157
|
+
|
|
158
|
+
- title: "Longest Substring Without Repeating Characters"
|
|
159
|
+
url: "https://leetcode.com/problems/longest-substring-without-repeating-characters/"
|
|
160
|
+
difficulty: "Medium"
|
|
161
|
+
tags: ["string", "sliding-window", "hash-table"]
|
|
162
|
+
|
|
163
|
+
- title: "3Sum"
|
|
164
|
+
url: "https://leetcode.com/problems/3sum/"
|
|
165
|
+
difficulty: "Medium"
|
|
166
|
+
tags: ["array", "two-pointers", "sorting"]
|
|
167
|
+
|
|
168
|
+
- title: "Binary Tree Level Order Traversal"
|
|
169
|
+
url: "https://leetcode.com/problems/binary-tree-level-order-traversal/"
|
|
170
|
+
difficulty: "Medium"
|
|
171
|
+
tags: ["tree", "bfs"]
|
|
172
|
+
|
|
173
|
+
- title: "Clone Graph"
|
|
174
|
+
url: "https://leetcode.com/problems/clone-graph/"
|
|
175
|
+
difficulty: "Medium"
|
|
176
|
+
tags: ["graph", "bfs", "dfs"]
|
|
177
|
+
|
|
178
|
+
- title: "Evaluate Reverse Polish Notation"
|
|
179
|
+
url: "https://leetcode.com/problems/evaluate-reverse-polish-notation/"
|
|
180
|
+
difficulty: "Medium"
|
|
181
|
+
tags: ["array", "stack", "math"]
|
|
182
|
+
|
|
183
|
+
- name: "Week 4"
|
|
184
|
+
problems:
|
|
185
|
+
- title: "Course Schedule"
|
|
186
|
+
url: "https://leetcode.com/problems/course-schedule/"
|
|
187
|
+
difficulty: "Medium"
|
|
188
|
+
tags: ["graph", "topological-sort", "dfs"]
|
|
189
|
+
|
|
190
|
+
- title: "Implement Trie (Prefix Tree)"
|
|
191
|
+
url: "https://leetcode.com/problems/implement-trie-prefix-tree/"
|
|
192
|
+
difficulty: "Medium"
|
|
193
|
+
tags: ["trie", "design"]
|
|
194
|
+
|
|
195
|
+
- title: "Coin Change"
|
|
196
|
+
url: "https://leetcode.com/problems/coin-change/"
|
|
197
|
+
difficulty: "Medium"
|
|
198
|
+
tags: ["dynamic-programming", "bfs"]
|
|
199
|
+
|
|
200
|
+
- title: "Product of Array Except Self"
|
|
201
|
+
url: "https://leetcode.com/problems/product-of-array-except-self/"
|
|
202
|
+
difficulty: "Medium"
|
|
203
|
+
tags: ["array", "prefix-sum"]
|
|
204
|
+
|
|
205
|
+
- title: "Min Stack"
|
|
206
|
+
url: "https://leetcode.com/problems/min-stack/"
|
|
207
|
+
difficulty: "Medium"
|
|
208
|
+
tags: ["stack", "design"]
|
|
209
|
+
|
|
210
|
+
- title: "Validate Binary Search Tree"
|
|
211
|
+
url: "https://leetcode.com/problems/validate-binary-search-tree/"
|
|
212
|
+
difficulty: "Medium"
|
|
213
|
+
tags: ["tree", "dfs", "bst"]
|
|
214
|
+
|
|
215
|
+
- title: "Number of Islands"
|
|
216
|
+
url: "https://leetcode.com/problems/number-of-islands/"
|
|
217
|
+
difficulty: "Medium"
|
|
218
|
+
tags: ["graph", "dfs", "bfs", "union-find"]
|
|
219
|
+
|
|
220
|
+
- title: "Rotting Oranges"
|
|
221
|
+
url: "https://leetcode.com/problems/rotting-oranges/"
|
|
222
|
+
difficulty: "Medium"
|
|
223
|
+
tags: ["graph", "bfs", "matrix"]
|
|
224
|
+
|
|
225
|
+
- name: "Week 5"
|
|
226
|
+
problems:
|
|
227
|
+
- title: "Search in Rotated Sorted Array"
|
|
228
|
+
url: "https://leetcode.com/problems/search-in-rotated-sorted-array/"
|
|
229
|
+
difficulty: "Medium"
|
|
230
|
+
tags: ["array", "binary-search"]
|
|
231
|
+
|
|
232
|
+
- title: "Combination Sum"
|
|
233
|
+
url: "https://leetcode.com/problems/combination-sum/"
|
|
234
|
+
difficulty: "Medium"
|
|
235
|
+
tags: ["array", "backtracking"]
|
|
236
|
+
|
|
237
|
+
- title: "Permutations"
|
|
238
|
+
url: "https://leetcode.com/problems/permutations/"
|
|
239
|
+
difficulty: "Medium"
|
|
240
|
+
tags: ["array", "backtracking"]
|
|
241
|
+
|
|
242
|
+
- title: "Merge Intervals"
|
|
243
|
+
url: "https://leetcode.com/problems/merge-intervals/"
|
|
244
|
+
difficulty: "Medium"
|
|
245
|
+
tags: ["array", "interval", "sorting"]
|
|
246
|
+
|
|
247
|
+
- title: "Lowest Common Ancestor of a Binary Tree"
|
|
248
|
+
url: "https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/"
|
|
249
|
+
difficulty: "Medium"
|
|
250
|
+
tags: ["tree", "dfs"]
|
|
251
|
+
|
|
252
|
+
- title: "Time Based Key-Value Store"
|
|
253
|
+
url: "https://leetcode.com/problems/time-based-key-value-store/"
|
|
254
|
+
difficulty: "Medium"
|
|
255
|
+
tags: ["hash-table", "binary-search", "design"]
|
|
256
|
+
|
|
257
|
+
- title: "Accounts Merge"
|
|
258
|
+
url: "https://leetcode.com/problems/accounts-merge/"
|
|
259
|
+
difficulty: "Medium"
|
|
260
|
+
tags: ["graph", "dfs", "union-find"]
|
|
261
|
+
|
|
262
|
+
- title: "Sort Colors"
|
|
263
|
+
url: "https://leetcode.com/problems/sort-colors/"
|
|
264
|
+
difficulty: "Medium"
|
|
265
|
+
tags: ["array", "two-pointers", "sorting"]
|
|
266
|
+
|
|
267
|
+
- name: "Week 6"
|
|
268
|
+
problems:
|
|
269
|
+
- title: "Word Break"
|
|
270
|
+
url: "https://leetcode.com/problems/word-break/"
|
|
271
|
+
difficulty: "Medium"
|
|
272
|
+
tags: ["dynamic-programming", "trie", "memoization"]
|
|
273
|
+
|
|
274
|
+
- title: "Partition Equal Subset Sum"
|
|
275
|
+
url: "https://leetcode.com/problems/partition-equal-subset-sum/"
|
|
276
|
+
difficulty: "Medium"
|
|
277
|
+
tags: ["dynamic-programming"]
|
|
278
|
+
|
|
279
|
+
- title: "String to Integer (atoi)"
|
|
280
|
+
url: "https://leetcode.com/problems/string-to-integer-atoi/"
|
|
281
|
+
difficulty: "Medium"
|
|
282
|
+
tags: ["string"]
|
|
283
|
+
|
|
284
|
+
- title: "Spiral Matrix"
|
|
285
|
+
url: "https://leetcode.com/problems/spiral-matrix/"
|
|
286
|
+
difficulty: "Medium"
|
|
287
|
+
tags: ["array", "matrix"]
|
|
288
|
+
|
|
289
|
+
- title: "Subsets"
|
|
290
|
+
url: "https://leetcode.com/problems/subsets/"
|
|
291
|
+
difficulty: "Medium"
|
|
292
|
+
tags: ["array", "backtracking"]
|
|
293
|
+
|
|
294
|
+
- title: "Binary Tree Right Side View"
|
|
295
|
+
url: "https://leetcode.com/problems/binary-tree-right-side-view/"
|
|
296
|
+
difficulty: "Medium"
|
|
297
|
+
tags: ["tree", "dfs", "bfs"]
|
|
298
|
+
|
|
299
|
+
- title: "Longest Palindromic Substring"
|
|
300
|
+
url: "https://leetcode.com/problems/longest-palindromic-substring/"
|
|
301
|
+
difficulty: "Medium"
|
|
302
|
+
tags: ["string", "dynamic-programming"]
|
|
303
|
+
|
|
304
|
+
- title: "Unique Paths"
|
|
305
|
+
url: "https://leetcode.com/problems/unique-paths/"
|
|
306
|
+
difficulty: "Medium"
|
|
307
|
+
tags: ["dynamic-programming", "math"]
|
|
308
|
+
|
|
309
|
+
- title: "Construct Binary Tree from Preorder and Inorder Traversal"
|
|
310
|
+
url: "https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/"
|
|
311
|
+
difficulty: "Medium"
|
|
312
|
+
tags: ["tree", "dfs", "array"]
|
|
313
|
+
|
|
314
|
+
- name: "Week 7"
|
|
315
|
+
problems:
|
|
316
|
+
- title: "Container With Most Water"
|
|
317
|
+
url: "https://leetcode.com/problems/container-with-most-water/"
|
|
318
|
+
difficulty: "Medium"
|
|
319
|
+
tags: ["array", "two-pointers", "greedy"]
|
|
320
|
+
|
|
321
|
+
- title: "Letter Combinations of a Phone Number"
|
|
322
|
+
url: "https://leetcode.com/problems/letter-combinations-of-a-phone-number/"
|
|
323
|
+
difficulty: "Medium"
|
|
324
|
+
tags: ["string", "backtracking"]
|
|
325
|
+
|
|
326
|
+
- title: "Word Search"
|
|
327
|
+
url: "https://leetcode.com/problems/word-search/"
|
|
328
|
+
difficulty: "Medium"
|
|
329
|
+
tags: ["array", "matrix", "backtracking"]
|
|
330
|
+
|
|
331
|
+
- title: "Find All Anagrams in a String"
|
|
332
|
+
url: "https://leetcode.com/problems/find-all-anagrams-in-a-string/"
|
|
333
|
+
difficulty: "Medium"
|
|
334
|
+
tags: ["string", "sliding-window", "hash-table"]
|
|
335
|
+
|
|
336
|
+
- title: "Minimum Height Trees"
|
|
337
|
+
url: "https://leetcode.com/problems/minimum-height-trees/"
|
|
338
|
+
difficulty: "Medium"
|
|
339
|
+
tags: ["graph", "bfs", "topological-sort"]
|
|
340
|
+
|
|
341
|
+
- title: "Task Scheduler"
|
|
342
|
+
url: "https://leetcode.com/problems/task-scheduler/"
|
|
343
|
+
difficulty: "Medium"
|
|
344
|
+
tags: ["array", "heap", "greedy"]
|
|
345
|
+
|
|
346
|
+
- title: "LRU Cache"
|
|
347
|
+
url: "https://leetcode.com/problems/lru-cache/"
|
|
348
|
+
difficulty: "Medium"
|
|
349
|
+
tags: ["linked-list", "hash-table", "design"]
|
|
350
|
+
|
|
351
|
+
- name: "Week 8"
|
|
352
|
+
problems:
|
|
353
|
+
- title: "Kth Smallest Element in a BST"
|
|
354
|
+
url: "https://leetcode.com/problems/kth-smallest-element-in-a-bst/"
|
|
355
|
+
difficulty: "Medium"
|
|
356
|
+
tags: ["tree", "dfs", "bst"]
|
|
357
|
+
|
|
358
|
+
- title: "Minimum Window Substring"
|
|
359
|
+
url: "https://leetcode.com/problems/minimum-window-substring/"
|
|
360
|
+
difficulty: "Hard"
|
|
361
|
+
tags: ["string", "sliding-window", "hash-table"]
|
|
362
|
+
|
|
363
|
+
- title: "Serialize and Deserialize Binary Tree"
|
|
364
|
+
url: "https://leetcode.com/problems/serialize-and-deserialize-binary-tree/"
|
|
365
|
+
difficulty: "Hard"
|
|
366
|
+
tags: ["tree", "dfs", "bfs", "design"]
|
|
367
|
+
|
|
368
|
+
- title: "Trapping Rain Water"
|
|
369
|
+
url: "https://leetcode.com/problems/trapping-rain-water/"
|
|
370
|
+
difficulty: "Hard"
|
|
371
|
+
tags: ["array", "two-pointers", "dynamic-programming"]
|
|
372
|
+
|
|
373
|
+
- title: "Find Median from Data Stream"
|
|
374
|
+
url: "https://leetcode.com/problems/find-median-from-data-stream/"
|
|
375
|
+
difficulty: "Hard"
|
|
376
|
+
tags: ["heap", "design", "sorting"]
|
|
377
|
+
|
|
378
|
+
- title: "Word Ladder"
|
|
379
|
+
url: "https://leetcode.com/problems/word-ladder/"
|
|
380
|
+
difficulty: "Hard"
|
|
381
|
+
tags: ["graph", "bfs", "string"]
|
|
382
|
+
|
|
383
|
+
- title: "Basic Calculator"
|
|
384
|
+
url: "https://leetcode.com/problems/basic-calculator/"
|
|
385
|
+
difficulty: "Hard"
|
|
386
|
+
tags: ["math", "string", "stack"]
|
|
387
|
+
|
|
388
|
+
- title: "Maximum Profit in Job Scheduling"
|
|
389
|
+
url: "https://leetcode.com/problems/maximum-profit-in-job-scheduling/"
|
|
390
|
+
difficulty: "Hard"
|
|
391
|
+
tags: ["dynamic-programming", "binary-search", "sorting"]
|
|
392
|
+
|
|
393
|
+
- title: "Merge k Sorted Lists"
|
|
394
|
+
url: "https://leetcode.com/problems/merge-k-sorted-lists/"
|
|
395
|
+
difficulty: "Hard"
|
|
396
|
+
tags: ["linked-list", "heap", "divide-and-conquer"]
|
|
397
|
+
|
|
398
|
+
- title: "Largest Rectangle in Histogram"
|
|
399
|
+
url: "https://leetcode.com/problems/largest-rectangle-in-histogram/"
|
|
400
|
+
difficulty: "Hard"
|
|
401
|
+
tags: ["array", "stack", "monotonic-stack"]
|