-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractice_problems.json
More file actions
300 lines (300 loc) · 12.3 KB
/
practice_problems.json
File metadata and controls
300 lines (300 loc) · 12.3 KB
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
{
"leetcode": [
{
"id": "lc1",
"title": "Two Sum",
"difficulty": "Easy",
"description": "Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.",
"url": "https://leetcode.com/problems/two-sum/",
"platform": "LeetCode",
"tags": [
"Array",
"Hash Table"
]
},
{
"id": "lc2",
"title": "Add Two Numbers",
"difficulty": "Medium",
"description": "You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.",
"url": "https://leetcode.com/problems/add-two-numbers/",
"platform": "LeetCode",
"tags": [
"Linked List",
"Math",
"Recursion"
]
},
{
"id": "lc3",
"title": "Longest Substring Without Repeating Characters",
"difficulty": "Medium",
"description": "Given a string s, find the length of the longest substring without repeating characters.",
"url": "https://leetcode.com/problems/longest-substring-without-repeating-characters/",
"platform": "LeetCode",
"tags": [
"Hash Table",
"String",
"Sliding Window"
]
},
{
"id": "lc4",
"title": "Median of Two Sorted Arrays",
"difficulty": "Hard",
"description": "Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.",
"url": "https://leetcode.com/problems/median-of-two-sorted-arrays/",
"platform": "LeetCode",
"tags": [
"Array",
"Binary Search",
"Divide and Conquer"
]
},
{
"id": "lc5",
"title": "Longest Palindromic Substring",
"difficulty": "Medium",
"description": "Given a string s, return the longest palindromic substring in s.",
"url": "https://leetcode.com/problems/longest-palindromic-substring/",
"platform": "LeetCode",
"tags": [
"String",
"Dynamic Programming"
]
},
{
"id": "lc6",
"title": "Valid Parentheses",
"difficulty": "Easy",
"description": "Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.",
"url": "https://leetcode.com/problems/valid-parentheses/",
"platform": "LeetCode",
"tags": [
"String",
"Stack"
]
},
{
"id": "lc7",
"title": "Remove Duplicates from Sorted Array",
"difficulty": "Easy",
"description": "Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once.",
"url": "https://leetcode.com/problems/remove-duplicates-from-sorted-array/",
"platform": "LeetCode",
"tags": [
"Array",
"Two Pointers"
]
},
{
"id": "lc8",
"title": "Merge Two Sorted Lists",
"difficulty": "Easy",
"description": "You are given the heads of two sorted linked lists list1 and list2. Merge the two lists in a one sorted list.",
"url": "https://leetcode.com/problems/merge-two-sorted-lists/",
"platform": "LeetCode",
"tags": [
"Linked List",
"Recursion"
]
},
{
"id": "lc9",
"title": "Binary Tree Level Order Traversal",
"difficulty": "Medium",
"description": "Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level).",
"url": "https://leetcode.com/problems/binary-tree-level-order-traversal/",
"platform": "LeetCode",
"tags": [
"Tree",
"BFS",
"Binary Tree"
]
},
{
"id": "lc10",
"title": "Word Search",
"difficulty": "Medium",
"description": "Given an m x n grid of characters board and a string word, return true if word exists in the grid.",
"url": "https://leetcode.com/problems/word-search/",
"platform": "LeetCode",
"tags": [
"Array",
"Backtracking",
"Matrix"
]
},
{
"id": "lc11",
"title": "Trapping Rain Water",
"difficulty": "Hard",
"description": "Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.",
"url": "https://leetcode.com/problems/trapping-rain-water/",
"platform": "LeetCode",
"tags": [
"Array",
"Two Pointers",
"Dynamic Programming",
"Stack"
]
},
{
"id": "lc12",
"title": "Merge k Sorted Lists",
"difficulty": "Hard",
"description": "You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list and return it.",
"url": "https://leetcode.com/problems/merge-k-sorted-lists/",
"platform": "LeetCode",
"tags": [
"Linked List",
"Divide and Conquer",
"Heap"
]
}
],
"hackerrank": [
{
"id": "hr1",
"title": "Solve Me First",
"difficulty": "Easy",
"description": "Complete the function solveMeFirst to compute the sum of two integers.",
"url": "https://www.hackerrank.com/challenges/solve-me-first/problem",
"platform": "HackerRank",
"tags": [
"Introduction"
]
},
{
"id": "hr2",
"title": "Simple Array Sum",
"difficulty": "Easy",
"description": "Given an array of integers, find the sum of its elements.",
"url": "https://www.hackerrank.com/challenges/simple-array-sum/problem",
"platform": "HackerRank",
"tags": [
"Arrays"
]
},
{
"id": "hr3",
"title": "Compare the Triplets",
"difficulty": "Easy",
"description": "Alice and Bob each created one problem for HackerRank. A reviewer rates the two challenges, awarding points on a scale from 1 to 100 for three categories: problem clarity, originality, and difficulty.",
"url": "https://www.hackerrank.com/challenges/compare-the-triplets/problem",
"platform": "HackerRank",
"tags": [
"Implementation"
]
},
{
"id": "hr4",
"title": "A Very Big Sum",
"difficulty": "Easy",
"description": "Calculate and print the sum of the elements in an array, keeping in mind that some of those integers may be quite large.",
"url": "https://www.hackerrank.com/challenges/a-very-big-sum/problem",
"platform": "HackerRank",
"tags": [
"Arrays",
"Math"
]
},
{
"id": "hr5",
"title": "Diagonal Difference",
"difficulty": "Easy",
"description": "Given a square matrix, calculate the absolute difference between the sums of its diagonals.",
"url": "https://www.hackerrank.com/challenges/diagonal-difference/problem",
"platform": "HackerRank",
"tags": [
"Arrays",
"Math"
]
},
{
"id": "hr6",
"title": "Birthday Cake Candles",
"difficulty": "Easy",
"description": "You are in charge of the cake for a child's birthday. You have decided the cake will have one candle for each year of their total age. They will only be able to blow out the tallest of the candles. Count how many candles are tallest.",
"url": "https://www.hackerrank.com/challenges/birthday-cake-candles/problem",
"platform": "HackerRank",
"tags": [
"Arrays",
"Math"
]
},
{
"id": "hr7",
"title": "Matrix Layer Rotation",
"difficulty": "Hard",
"description": "You are given a 2D matrix of dimension MxN and a positive integer R. You have to rotate the matrix R times and print the resultant matrix.",
"url": "https://www.hackerrank.com/challenges/matrix-rotation-algo/problem",
"platform": "HackerRank",
"tags": [
"Implementation",
"Arrays"
]
},
{
"id": "hr8",
"title": "The Time in Words",
"difficulty": "Medium",
"description": "Given the time in numerals we may convert it into words.",
"url": "https://www.hackerrank.com/challenges/the-time-in-words/problem",
"platform": "HackerRank",
"tags": [
"Implementation",
"Strings"
]
},
{
"id": "hr9",
"title": "Forming a Magic Square",
"difficulty": "Medium",
"description": "We define a magic square to be an n\u00d7n matrix of distinct positive integers from 1 to n^2 where the sum of any row, column, or diagonal is always equal to the same number.",
"url": "https://www.hackerrank.com/challenges/magic-square-forming/problem",
"platform": "HackerRank",
"tags": [
"Implementation",
"Backtracking"
]
},
{
"id": "hr10",
"title": "Journey to the Moon",
"difficulty": "Medium",
"description": "The member states of the UN are planning to send people to the moon. They want them to be from different countries. You will be given a list of pairs of astronaut ID's. Each pair is made of astronauts from the same country. Determine how many pairs of astronauts from different countries they can choose from.",
"url": "https://www.hackerrank.com/challenges/journey-to-the-moon/problem",
"platform": "HackerRank",
"tags": [
"Graph Theory",
"DFS"
]
},
{
"id": "hr11",
"title": "Sherlock and the Valid String",
"difficulty": "Medium",
"description": "Sherlock considers a string to be valid if all characters of the string appear the same number of times. It is also valid if he can remove just 1 character at 1 index in the string, and the remaining characters will occur the same number of times.",
"url": "https://www.hackerrank.com/challenges/sherlock-and-valid-string/problem",
"platform": "HackerRank",
"tags": [
"String",
"Hash Tables"
]
},
{
"id": "hr12",
"title": "The Bomberman Game",
"difficulty": "Medium",
"description": "Bomberman lives in a rectangular grid. Each cell in the grid either contains a bomb or nothing at all. Each bomb can be planted in any cell of the grid but once planted, it will detonate after exactly 3 seconds. Once a bomb detonates, it destroys all adjacent cells.",
"url": "https://www.hackerrank.com/challenges/bomber-man/problem",
"platform": "HackerRank",
"tags": [
"Implementation",
"Simulation"
]
}
],
"completed_problems": {}
}