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
Copy file name to clipboardExpand all lines: backend/question-service/src/scripts/seed.ts
+12-26Lines changed: 12 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -11,98 +11,84 @@ export async function seedQuestions() {
11
11
description:
12
12
"Design an algorithm to serialize and deserialize a binary tree. There is no restriction on how your serialization/deserialization algorithm should work. You just need to ensure that a binary tree can be serialized to a string and this string can be deserialized to the original tree structure. \n\n",
13
13
complexity: "Hard",
14
-
category: ["Tree","Design"],
14
+
category: ["Tree"],
15
15
},
16
16
{
17
17
title: "Two Sum",
18
18
description:
19
19
"Given an array of integers `nums` and an integer `target`, return indices of the two numbers such that they add up to `target`. You may assume that each input would have **exactly one solution**, and you may not use the same element twice. You can return the answer in any order.",
20
20
complexity: "Easy",
21
-
category: ["Array","Hash Table"],
22
-
},
23
-
{
24
-
title: "Add Two Numbers",
25
-
description:
26
-
"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. You may assume the two numbers do not contain any leading zero, except the number 0 itself.",
27
-
complexity: "Medium",
28
-
category: ["Linked List","Math"],
21
+
category: ["Arrays"],
29
22
},
30
23
{
31
24
title: "Longest Substring Without Repeating Characters",
32
25
description:
33
26
"Given a string `s`, find the length of the **longest substring** without repeating characters.",
"Given two sorted arrays `nums1` and `nums2` of size `m` and `n` respectively, return the median of the two sorted arrays.",
41
34
complexity: "Hard",
42
-
category: ["Array","Binary Search","Divide and Conquer"],
35
+
category: ["Arrays"],
43
36
},
44
37
{
45
38
title: "Longest Palindromic Substring",
46
39
description:
47
40
"Given a string `s`, return the **longest palindromic substring** in `s`.",
48
41
complexity: "Medium",
49
-
category: ["String","Dynamic Programming"],
42
+
category: ["Strings","Dynamic Programming"],
50
43
},
51
44
{
52
45
title: "ZigZag Conversion",
53
46
description:
54
47
"The string `PAYPALISHIRING` is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I G Y I R And then read line by line: `PAHNAPLSIIGYIR` Write the code that will take a string and make this conversion given a number of rows.",
55
48
complexity: "Medium",
56
-
category: ["String"],
49
+
category: ["Strings"],
57
50
},
58
51
{
59
52
title: "Reverse Integer",
60
53
description:
61
54
"Given a signed 32-bit integer `x`, return `x` with its digits reversed. If reversing `x` causes the value to go outside the signed 32-bit integer range `[-2^31, 2^31 - 1]`, then return 0.",
62
55
complexity: "Easy",
63
-
category: ["Math"],
56
+
category: ["Strings"],
64
57
},
65
58
{
66
59
title: "String to Integer (atoi)",
67
60
description:
68
61
"Implement the `myAtoi(string s)` function, which converts a string to a 32-bit signed integer (similar to C/C++'s `atoi` function).",
69
62
complexity: "Medium",
70
-
category: ["Math","String"],
71
-
},
72
-
{
73
-
title: "Palindrome Number",
74
-
description:
75
-
"Given an integer `x`, return `true` if `x` is a palindrome integer. An integer is a palindrome when it reads the same backward as forward. For example, `121` is palindrome while `123` is not.",
76
-
complexity: "Easy",
77
-
category: ["Math"],
63
+
category: ["Strings"],
78
64
},
79
65
{
80
66
title: "Regular Expression Matching",
81
67
description:
82
68
"Given an input string `s` and a pattern `p`, implement regular expression matching with support for `'.'` and `'*'` where: - `'.'` Matches any single character. - `'*'` Matches zero or more of the preceding element.",
"Given `n` non-negative integers `a1, a2, ..., an`, where each represents a point at coordinate `(i, ai)`. `n` vertical lines are drawn such that the two endpoints of the line `i` is at `(i, ai)` and `(i, 0)`. Find two lines, which, together with the x-axis forms a container, such that the container contains the most water.",
90
76
complexity: "Medium",
91
-
category: ["Array","Two Pointers"],
77
+
category: ["Arrays"],
92
78
},
93
79
{
94
80
title: "Integer to Roman",
95
81
description:
96
82
"Roman numerals are represented by seven different symbols: `I`, `V`, `X`, `L`, `C`, `D` and `M`. Given an integer, convert it to a roman numeral.",
97
83
complexity: "Medium",
98
-
category: ["Math","String"],
84
+
category: ["Strings"],
99
85
},
100
86
{
101
87
title: "Roman to Integer",
102
88
description:
103
89
"Roman numerals are represented by seven different symbols: `I`, `V`, `X`, `L`, `C`, `D` and `M`. Given a roman numeral, convert it to an integer.",
0 commit comments