TwoSum1 [LeetCode] #1 Two Sum Two SumxGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same element twice. 첫번째 문제 답게 쉬운 문제가 나왔다.그런데 뭔가 멋있게 풀고싶은 마음이 너무 드글드글해서,회사 제품 특성상 낮은 jdk버전에도 사용 가능한 코드만 짜다보니 간단하면서도 최근 jdk(라고 해봐야 자바8이지만..ㅎㅎ)에서 사용 가능한 방법으로 풀고싶었다. 그래서 우선 스트림을 사용해봤다.xxxxxxxxxximport.. 2019. 12. 5. 이전 1 다음