Algorithms in Swift: Find all two elements pair in the array that add up to given sum

preview_player
Показать описание
#AppDeveloper #iOStpoint #Swift #swiftui #swiftuitutorial #ios #iosdeveloper
Chapters:
0:00 Overview
0:50 Worst Approach
3:40 Better Approach
8:00 Best Approach

Follow us on:
Рекомендации по теме
Комментарии
Автор

Magic is that in this particular example left = left - 1 and left = left + 1 in the end, results as expected.

ajitsatarkar
Автор

There is a error : line: 65 else condition it should be "left = left + 1" as we are increasing the index value of left to right

samdon
Автор

Nice video on two pointer, just a small correction at the end line 65 left = left - 1

mukeshhembrom
Автор

what if we use Set instead of Array since there is no duplicate in Set ?🤔

avazbekolimov
Автор

Awesome bro ❤ It would be great if you provide all there code in description link

bhanu