The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2

前端 未结 0 1318
不知归路
不知归路 2020-12-20 15:55
class Solution {
public int[] twoSum(int[] numbers, int target) {
    
    int[] res = new int[2];
    for(int i=1;i<=numbers.length;i++){
        for(int j=i+1;j         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题