목록알고리즘 (7)
EPguy
[LeetCode] 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. 정수 배열 nums와 정수 target이 주어졌을 때, 두 개의 숫자를 더하면 target이 되는 인덱스들을 반환해야한다. 각 입력은 정확히 하나의 해결책을 가지며, 동일한 요소를 두 번 사용하지 않아야 합니다. 답변은 어떤..
알고리즘/LeetCode
2024. 3. 7. 14:42