Repository navigation
Expand file tree
/
Copy pathinitial_problems.json
More file actions
115 lines (115 loc) · 3.49 KB
/
Copy pathinitial_problems.json
File metadata and controls
115 lines (115 loc) · 3.49 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
[
{
"title": "Two Sum",
"description": "### Description\nGiven an array of integers `nums` and an integer `target`, return the indices of the two numbers whose sum is `target`.\n\n### Example\n**Input:** nums = [2,7,11,15], target = 9\n**Output:** [0,1]",
"difficulty": "easy",
"category": "Arrays",
"is_active": true,
"test_cases": [
{
"input_data": "[2,7,11,15] 9",
"expected_output": "[0, 1]"
},
{
"input_data": "[3,2,4] 6",
"expected_output": "[1, 2]"
},
{
"input_data": "[-1,-2,-3,-4,-5] -8",
"expected_output": "[2, 4]"
}
]
},
{
"title": "Palindrome Number",
"description": "### Description\nGiven an integer `x`, return `true` if `x` is a palindrome, and `false` otherwise.",
"difficulty": "easy",
"category": "Math",
"is_active": true,
"test_cases": [
{
"input_data": "121",
"expected_output": "true"
},
{
"input_data": "-121",
"expected_output": "false"
},
{
"input_data": "10",
"expected_output": "false"
},
{
"input_data": "0",
"expected_output": "true"
}
]
},
{
"title": "Longest Substring Without Repeating Characters",
"description": "### Description\nGiven a string `s`, find the length of the longest substring without repeating characters.",
"difficulty": "medium",
"category": "Strings",
"is_active": true,
"test_cases": [
{
"input_data": "abcabcbb",
"expected_output": "3"
},
{
"input_data": "bbbbb",
"expected_output": "1"
},
{
"input_data": " ",
"expected_output": "1"
},
{
"input_data": "",
"expected_output": "0"
}
]
},
{
"title": "Add Two Numbers",
"description": "### Description\nYou are given two non-empty linked lists representing two non-negative integers.",
"difficulty": "medium",
"category": "Linked Lists",
"is_active": true,
"test_cases": [
{
"input_data": "[2,4,3] [5,6,4]",
"expected_output": "[7,0,8]"
},
{
"input_data": "[9,9] [1]",
"expected_output": "[0,0,1]"
},
{
"input_data": "[0] [0]",
"expected_output": "[0]"
}
]
},
{
"title": "Median of Two Sorted Arrays",
"description": "### Description\nGiven two sorted arrays `nums1` and `nums2` of size `m` and `n` respectively, return the median.",
"difficulty": "hard",
"category": "Binary Search",
"is_active": true,
"test_cases": [
{
"input_data": "[1,3] [2]",
"expected_output": "2.0"
},
{
"input_data": "[1,2] [3,4]",
"expected_output": "2.5"
},
{
"input_data": "[] [1]",
"expected_output": "1.0"
}
]
}
]