THE_ALGORITHMS Telegram 4863
Два целых числа

Проблема: Дан массив целых чисел nums и целочисленный target. Необходимо реализовать алгоритм, который вернет индексы i и j такие, что nums[i] + nums[j] == target и i != j. Можно предположить, что каждый input имеет ровно одну пару индексов i и j, удовлетворяющих условию. Сначала верните ответ с меньшим индексом.

Пример 1:
Input: nums = [3,4,5,6], target = 7
Output: [0,1]



Пример 2:
Input: nums = [-3,4,3,90], target=0
Output: [0,2]



tgoop.com/the_algorithms/4863
Create:
Last Update:

Два целых числа

Проблема: Дан массив целых чисел nums и целочисленный target. Необходимо реализовать алгоритм, который вернет индексы i и j такие, что nums[i] + nums[j] == target и i != j. Можно предположить, что каждый input имеет ровно одну пару индексов i и j, удовлетворяющих условию. Сначала верните ответ с меньшим индексом.

Пример 1:
Input: nums = [3,4,5,6], target = 7
Output: [0,1]



Пример 2:
Input: nums = [-3,4,3,90], target=0
Output: [0,2]

BY Алгоритмы и структуры данных




Share with your friend now:
tgoop.com/the_algorithms/4863

View MORE
Open in Telegram


Telegram News

Date: |

bank east asia october 20 kowloon Telegram desktop app: In the upper left corner, click the Menu icon (the one with three lines). Select “New Channel” from the drop-down menu. While the character limit is 255, try to fit into 200 characters. This way, users will be able to take in your text fast and efficiently. Reveal the essence of your channel and provide contact information. For example, you can add a bot name, link to your pricing plans, etc. The group’s featured image is of a Pepe frog yelling, often referred to as the “REEEEEEE” meme. Pepe the Frog was created back in 2005 by Matt Furie and has since become an internet symbol for meme culture and “degen” culture. 2How to set up a Telegram channel? (A step-by-step tutorial)
from us


Telegram Алгоритмы и структуры данных
FROM American