You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13,75 +14,142 @@ export default function LoggedIn() {
13
14
}
14
15
15
16
// TODO: replace with backend-fetched data
16
-
constproblems=[
17
+
constproblems: Problem[]=[
17
18
{
18
-
status: "attempted",
19
-
title: "2220. Minimum Bit Flips to Convert Number",
20
-
topics: ["Bit Manipulation"],
21
-
difficulty: "Easy",
22
-
difficultyColor: "text-green-500",
19
+
question_id: 1,
20
+
title: "Two Sum",
21
+
difficulty: 1,
22
+
description:
23
+
"Given an array of integers nums\u00a0and an integer target, return indices of the two numbers such that they add up to target.\nYou may assume that each input would have exactly one solution, and you may not use the same element twice.\nYou can return the answer in any order.",
24
+
examples: [
25
+
"Example 1:\nInput: nums = [2,7,11,15], target = 9\nOutput: [0,1]\nExplanation: Because nums[0] + nums[1] == 9, we return [0, 1].",
"Constraints:\n\n2 <= nums.length <= 10^4\n-10^9 <= nums[i] <= 10^9\n-10^9 <= target <= 10^9\nOnly one valid answer exists.\n\n\u00a0\nFollow-up:\u00a0Can you come up with an algorithm that is less than O(n^2)\u00a0time complexity?",
31
+
tags: ["Array","Hash Table"],
32
+
title_slug: "two-sum",
23
33
},
24
34
{
25
-
status: "solved",
26
-
title: "1. Two Sum",
27
-
topics: ["Array","Hash Table"],
28
-
difficulty: "Easy",
29
-
difficultyColor: "text-green-500",
35
+
question_id: 9,
36
+
title: "Palindrome Number",
37
+
difficulty: 2,
38
+
description:
39
+
"Given an integer x, return true if x is a palindrome, and false otherwise.",
40
+
examples: [
41
+
"Example 1:\nInput: x = 121\nOutput: true\nExplanation: 121 reads as 121 from left to right and from right to left.",
42
+
"Example 2:\nInput: x = -121\nOutput: false\nExplanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.",
43
+
"Example 3:\nInput: x = 10\nOutput: false\nExplanation: Reads 01 from right to left. Therefore it is not a palindrome.",
44
+
],
45
+
constraints:
46
+
"Constraints:\n\n-2^31\u00a0<= x <= 2^31\u00a0- 1\n\n\u00a0\nFollow up: Could you solve it without converting the integer to a string?",
47
+
tags: ["Math"],
48
+
title_slug: "palindrome-number",
30
49
},
31
50
{
32
-
status: "unsolved",
33
-
title: "2. Add Two Numbers",
34
-
topics: ["Linked List","Math"],
35
-
difficulty: "Medium",
36
-
difficultyColor: "text-yellow-500",
51
+
question_id: 13,
52
+
title: "Roman to Integer",
53
+
difficulty: 1,
54
+
description:
55
+
"Roman numerals are represented by seven different symbols:\u00a0I, V, X, L, C, D and M.\n\nSymbol Value\nI 1\nV 5\nX 10\nL 50\nC 100\nD 500\nM 1000\nFor example,\u00a02 is written as II\u00a0in Roman numeral, just two ones added together. 12 is written as\u00a0XII, which is simply X + II. The number 27 is written as XXVII, which is XX + V + II.\nRoman numerals are usually written largest to smallest from left to right. However, the numeral for four is not IIII. Instead, the number four is written as IV. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as IX. There are six instances where subtraction is used:\n\nI can be placed before V (5) and X (10) to make 4 and 9.\u00a0\nX can be placed before L (50) and C (100) to make 40 and 90.\u00a0\nC can be placed before D (500) and M (1000) to make 400 and 900.\n\nGiven a roman numeral, convert it to an integer.",
56
+
examples: [
57
+
'Example 1:\nInput: s = "III"\nOutput: 3\nExplanation: III = 3.',
58
+
'Example 2:\nInput: s = "LVIII"\nOutput: 58\nExplanation: L = 50, V= 5, III = 3.',
59
+
'Example 3:\nInput: s = "MCMXCIV"\nOutput: 1994\nExplanation: M = 1000, CM = 900, XC = 90 and IV = 4.',
60
+
],
61
+
constraints:
62
+
"Constraints:\n\n1 <= s.length <= 15\ns contains only\u00a0the characters ('I', 'V', 'X', 'L', 'C', 'D', 'M').\nIt is guaranteed\u00a0that s is a valid roman numeral in the range [1, 3999].",
63
+
tags: ["Hash Table","Math","String"],
64
+
title_slug: "roman-to-integer",
37
65
},
38
66
{
39
-
status: "solved",
40
-
title: "3. Longest Substring Without Repeating Characters",
41
-
topics: ["Hash Table","String","Sliding Window"],
42
-
difficulty: "Medium",
43
-
difficultyColor: "text-yellow-500",
44
-
},
45
-
{
46
-
status: "unsolved",
47
-
title: "4. Median of Two Sorted Arrays",
48
-
topics: ["Array","Binary Search","Divide and Conquer"],
49
-
difficulty: "Hard",
50
-
difficultyColor: "text-red-500",
51
-
},
52
-
{
53
-
status: "unsolved",
54
-
title: "5. Longest Palindromic Substring",
55
-
topics: ["String","Dynamic Programming"],
56
-
difficulty: "Medium",
57
-
difficultyColor: "text-yellow-500",
58
-
},
59
-
{
60
-
status: "unsolved",
61
-
title: "6. Zigzag Conversion",
62
-
topics: ["String"],
63
-
difficulty: "Medium",
64
-
difficultyColor: "text-yellow-500",
65
-
},
66
-
{
67
-
status: "unsolved",
68
-
title: "7. Reverse Integer",
69
-
topics: ["Math"],
70
-
difficulty: "Medium",
71
-
difficultyColor: "text-yellow-500",
72
-
},
73
-
{
74
-
status: "unsolved",
75
-
title: "8. String to Integer (atoi)",
76
-
topics: ["String","Math"],
77
-
difficulty: "Medium",
78
-
difficultyColor: "text-yellow-500",
79
-
},
80
-
{
81
-
status: "solved",
82
-
title: "9. Palindrome Number",
83
-
topics: ["Math"],
84
-
difficulty: "Easy",
85
-
difficultyColor: "text-green-500",
67
+
question_id: 14,
68
+
title: "Longest Common Prefix",
69
+
difficulty: 3,
70
+
description:
71
+
'Write a function to find the longest common prefix string amongst an array of strings.\nIf there is no common prefix, return an empty string "".',
0 commit comments