Skip to content

Commit f6b0c1f

Browse files
feat: implement threeSum algorithm
- Finds triplets in unsorted array that add up to 0.
1 parent 23d24fe commit f6b0c1f

File tree

5 files changed

+778
-243
lines changed

5 files changed

+778
-243
lines changed

.vscode/launch.json

+36-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,44 @@
55
"type": "node",
66
"request": "launch",
77
"name": "Vitest Current File",
8-
"program": "${workspaceFolder}/node_modules/.bin/vitest",
9-
"args": ["${fileBasenameNoExtension}", "--config", "vite.config.ts"],
8+
"runtimeExecutable": "pnpm",
9+
"runtimeArgs": [
10+
"exec",
11+
"vitest",
12+
"${fileBasenameNoExtension}",
13+
"--config",
14+
"vite.config.mts"
15+
],
16+
"console": "integratedTerminal",
17+
"internalConsoleOptions": "neverOpen"
18+
},
19+
{
20+
"type": "node",
21+
"request": "launch",
22+
"name": "Debug TypeScript Current File",
23+
"runtimeArgs": ["-r", "tsx"],
24+
"args": ["${relativeFile}"],
25+
"cwd": "${workspaceRoot}",
26+
"console": "integratedTerminal",
27+
"internalConsoleOptions": "neverOpen"
28+
},
29+
{
30+
"type": "node",
31+
"request": "launch",
32+
"name": "Debug TypeScript with pnpm",
33+
"runtimeExecutable": "pnpm",
34+
"runtimeArgs": ["run", "debug"],
1035
"console": "integratedTerminal",
1136
"internalConsoleOptions": "neverOpen",
12-
"windows": {
13-
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
14-
}
37+
"skipFiles": ["<node_internals>/**"]
38+
},
39+
{
40+
"type": "node",
41+
"request": "attach",
42+
"name": "Attach to Process",
43+
"port": 9229,
44+
"restart": true,
45+
"skipFiles": ["<node_internals>/**"]
1546
}
1647
]
1748
}

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"scripts": {
1010
"build-ts": "tsc",
1111
"build-dev": "tsc --watch",
12-
"start": "nodemon dist/index.js",
12+
"start": "ts-node src/index.ts",
1313
"dev": "concurrently \"pnpm:build-dev\" \"pnpm:start\"",
14+
"debug": "node --inspect-brk -r ts-node/register src/index.ts",
1415
"test:ci": "vitest run",
1516
"test:watch": "vitest watch --ui",
1617
"test:coverage": "vitest run --coverage",
@@ -42,6 +43,8 @@
4243
"lint-staged": "^15.3.0",
4344
"nodemon": "^3.0.1",
4445
"prettier": "^3.0.3",
46+
"ts-node": "^10.9.2",
47+
"tsx": "^4.19.2",
4548
"typescript": "^5.2.2",
4649
"vite-tsconfig-paths": "^5.1.4",
4750
"vitest": "^2.1.8",

0 commit comments

Comments
 (0)