-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproblems.json
More file actions
115 lines (114 loc) · 2.98 KB
/
Copy pathproblems.json
File metadata and controls
115 lines (114 loc) · 2.98 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
{
"questions": [
{
"ID":"1",
"title": "1. Frequency Minimizer",
"description": "Given an array of integers,find the minimum value of 'value * (n - frequency)' where 'value' is any number in the array and 'frequency' is the number of times it occurs consecutively.",
"test_cases": [
"5\n2 2 2 3 3",
"4\n5 5 5 5",
"6\n1 2 2 2 3 4"
],
"output": ["6", "0", "4"],
"submit_test_cases": [
"3\n7 7 8",
"5\n6 6 6 7 7",
"4\n1 1 1 2",
"6\n9 9 9 9 8 7",
"5\n2 3 3 3 3",
"6\n5 5 4 4 4 4",
"3\n8 8 9"
],
"submit_output": ["14", "6", "3", "14", "2", "4", "6"],
"status": false
},
{
"ID": "2",
"title": "2. Ceiling Calculator",
"description": "Given a list of floating-point numbers, output the ceiling of each number.",
"test_cases": [
"3\n2.3 3.1 4.8",
"2\n1.0 5.999",
"4\n6.3 7.8 8.1 9.0"
],
"output": ["3 4 5", "1 6", "7 8 9 9"],
"submit_test_cases": [
"2\n1.999 2.001",
"3\n0.0 0.99 1.01",
"4\n3.3 3.7 4.1 4.9",
"1\n9.999",
"2\n10.01 11.02",
"3\n5.4 6.6 7.8",
"3\n0.1 0.2 0.3"
],
"submit_output": ["2 3", "0 1 2", "4 4 5 5", "10", "11 12", "6 7 8", "1 1 1"],
"status": false
},
{
"ID": "3",
"title": "3. Log Base 2 Finder",
"description": "Given a list of positive integers, return the floor of the log base 2 for each.",
"test_cases": [
"3\n1 2 8",
"2\n15 32",
"4\n4 16 1 2"
],
"output": ["0 1 3", "3 5", "2 4 0 1"],
"submit_test_cases": [
"3\n3 5 9",
"2\n7 8",
"5\n2 4 8 16 32",
"1\n64",
"3\n1 1 1",
"2\n100 128",
"3\n9 10 11"
],
"submit_output": ["1 2 3", "2 3", "1 2 3 4 5", "6", "0 0 0", "6 7", "3 3 3"],
"status": false
},
{
"ID": "4",
"title": "4. Longest Consecutive Sequence",
"description": "Given an array of integers, find the length of the longest subsequence where the numbers are consecutive integers (not necessarily sorted or adjacent).",
"test_cases": [
"6\n100 4 200 1 3 2",
"5\n1 9 3 10 2",
"7\n10 5 12 3 55 11 4"
],
"output": ["4", "3", "4"],
"submit_test_cases": [
"6\n1 2 3 4 5 6",
"5\n10 30 20 40 50",
"4\n2 2 3 4",
"3\n7 8 10",
"5\n5 4 3 2 1",
"6\n99 100 101 102 103 200",
"7\n9 7 8 10 6 11 5"
],
"submit_output": ["6", "1", "3", "2", "5", "5", "7"],
"status": false
},
{
"ID": "5",
"title": "5. Smallest Missing Positive",
"description": "Given an unsorted array, find the smallest missing positive integer.",
"test_cases": [
"5\n1 2 0 4 5",
"3\n-1 -2 -3",
"4\n2 3 7 6"
],
"output": ["3", "1", "1"],
"submit_test_cases": [
"6\n3 4 -1 1 2 6",
"5\n5 3 2 1 4",
"3\n1 2 3",
"4\n7 8 9 11",
"6\n0 1 2 3 4 5",
"3\n10 11 12",
"5\n2 1 5 6 7"
],
"submit_output": ["5", "6", "4", "1", "6", "1", "3"],
"status": false
}
]
}