2 Sum Sorted (LeetCode) - JavaScript Coding Interview

preview_player
Показать описание
In this lesson we look at the two-sum problem with a slight modification - the input array is sorted.

Taking advantage of the sorting, we will look at a solution that actually saves the memory overhead of hash maps and gives a more real-world linear time performance.

This problem also helps you build some intuition about utilising sorted arrays 🌹

Course Page:

🏷 #basarat #Coding #Interview #5MinutesOrLess #TypeScript #JavaScript #Tutorial

👇 ❤️ Subscribe for MOORE ❤️ 👇

**Feel Free To Read This Lot**

I'm Basarat, and I love helping developers. More about me:

Microsoft MVP for TypeScript
200K contributions on Stackoverflow. Top Contributor for TypeScript.
Book Author: Beginning NodeJS
Book Author: TypeScript Deep Dive
Creator of multiple hot ✨ed Github Open Source projects

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

Love this coding interview question series! (Well, love all your other videos as well 😁)

Watching your explanation and then doing it myself without looking at your solution works wonders.

trashAndNoStar
Автор

I have subscribed for coding interview questions for JavaScript. Thanks for this video

kovendanragupathi
Автор

the code might break for const nums = [3, 2, 4]; const target = 6;

SahilBanga
Автор

Is this the type of interview question that gets asked at Seek? (Would you ask this question in an interview)

jialx
Автор

shouldn't this solution be moving to the next array item instead of left++ and right++ ? the only numbers that matter are the numbers listed in the array, or not?

wagnermoreira
visit shbcf.ru