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
+22-11Lines changed: 22 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
/* eslint-disable */
2
+
1
3
import{exit}from"process";
2
4
importconnectDBfrom"../config/db";
3
5
importQuestionfrom"../models/Question";
@@ -38,7 +40,7 @@ export async function seedQuestions() {
38
40
{
39
41
title: "Two Sum",
40
42
description:
41
-
"Given an array of integers `nums` and an integer `target`, return indices of the two numbers in a list 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.",
43
+
"Given an array of integers `nums` (line 1) and an integer `target` (line 2), return indices of the two numbers in a list 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. The list should be returned in sorted order.",
pythonTemplate: `# Please do not modify the main function\ndef main():\n\ts = input().strip()\n\tprint(solution(s))\n\n\n# Write your code here\ndef solution(s):\n\t# Implement your solution here\n\treturn ""\n\n\nif __name__ == "__main__":\n\tmain()\n`,
102
+
javaTemplate: `import java.util.Scanner;\n\npublic class Main {\n // Please do not modify the main function\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String s = scanner.nextLine().trim();\n System.out.println(solution(s));\n }\n\n // Write your code here\n public static String solution(String s) {\n // Implement your solution here\n return "";\n }\n}`,
103
+
cTemplate: `#include <stdio.h>\n#include <string.h>\n\n// Function to implement\nconst char* solution(const char* s) {\n // Implement your solution here\n return "";\n}\n\n// Please do not modify the main function\nint main() {\n char s[1000];\n fgets(s, sizeof(s), stdin);\n s[strcspn(s, "\\n")] = 0; // Remove newline\n printf("%s\\n", solution(s));\n return 0;\n}`,
0 commit comments