We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f18862 commit 3848180Copy full SHA for 3848180
two-sum/casentino.ts
@@ -0,0 +1,9 @@
1
+function twoSum(nums: number[], target: number): number[] | undefined {
2
+ for (let i = 0; i < nums.length; i++) {
3
+ for (let j = i + 1; j < nums.length; j++) {
4
+ if (nums[i] + nums[j] === target) {
5
+ return [i, j];
6
+ }
7
8
9
+}
0 commit comments