728x90
Two Sum
-
[ Array ] JAVA | 1. Two Sum (Medium)리트코드(Leetcode) 2023. 5. 26. 16:40
1번 Two Sum Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. => int[]인 배열 nums와 int target이 파라미터로 주어지며, nums 요소 중 두 요소의 합이 target과 동일할 때 두 숫자의 인덱스를 int[]인 배열로 반..