Leetcode 167 Two Sum II using Python | EXPLANATION

preview_player
Показать описание
Find two numbers that add up to a given target number from a 1-indexed array of integers that are already sorted in non-decreasing order.

Return an integer array [index1, index2] of length 2 that contains the indices of the two numbers index1 and index2, which were added by one.

The tests are created in a way that there is only one possible outcome. The same element may not be used more than once.

Your solution must only constantly space.
Рекомендации по теме
join shbcf.ru