diff --git a/1-two-sum/1-two-sum.cs b/1-two-sum/1-two-sum.cs new file mode 100644 index 0000000..b31efae --- /dev/null +++ b/1-two-sum/1-two-sum.cs @@ -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; + } +} \ No newline at end of file