Time: 171 ms (69.80%), Space: 43.9 MB (56.52%) - LeetHub

This commit is contained in:
Deven
2023-01-22 19:12:36 -05:00
parent 10d551ea98
commit 96b0d0648a
+12
View File
@@ -0,0 +1,12 @@
public class Solution {
public int[] TwoSum(int[] nums, int target) {
for (int i = 0; i < nums.Length; i++) {
for (int j = i + 1; j < nums.Length; j++) {
if (nums[i] + nums[j] == target) {
return new int[] {i , j};
}
}
}
return null;
}
}