File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,8 @@ return [0, 1].
2525``` java
2626class Solution {
2727 public int [] twoSum (int [] nums , int target ) {
28- int st = 0 , end = nums. length;
29- for (int i = 0 ; i < end; ++ i) {
30- for (int j = i + 1 ; j < end; ++ j) {
28+ for (int i = 0 ; i < nums. length; ++ i) {
29+ for (int j = i + 1 ; j < nums. length; ++ j) {
3130 if (nums[i] + nums[j] == target) {
3231 return new int []{i, j};
3332 }
Original file line number Diff line number Diff line change 1313 */
1414public class Solution {
1515// public int[] twoSum(int[] nums, int target) {
16- // int st = 0, end = nums.length;
17- // for (int i = 0; i < end; ++i) {
18- // for (int j = i + 1; j < end; ++j) {
16+ // for (int i = 0; i < nums.length; ++i) {
17+ // for (int j = i + 1; j < nums.length; ++j) {
1918// if (nums[i] + nums[j] == target) {
2019// return new int[]{i, j};
2120// }
You can’t perform that action at this time.
0 commit comments