[TESTDOME] Two Sum

MARCH 19, 2021

문제

006 01

  • 주어진 코드
public class TwoSum {
    public static int[] findTwoSum(int[] list, int sum) {
        throw new UnsupportedOperationException("Waiting to be implemented.");
    }

    public static void main(String[] args) {
        int[] indices = findTwoSum(new int[] { 3, 1, 5, 7, 5, 9 }, 10);
        if(indices != null) {
            System.out.println(indices[0] + " " + indices[1]);
        }
    }
}

결과 및 풀이

  • 결과
  • 풀이

배웠다


작업 기록 블로그