Two Sum | LeetCode 1 | JavaScript | Easy
Автор: Gordon Zhu
Загружено: 9 окт. 2023 г.
Просмотров: 19 174 просмотра
In painstaking detail, I go through my entire thought process for solving Two Sum from first principles. We'll start with the essential insights that lead us to the brute-force solution. From there, we'll optimize to get various performant O(n) time approaches. Finally, we'll discuss the pros/cons of our performant approaches.
My teaching work: https://watchandcode.com
Two sum problem: https://leetcode.com/problems/two-sum/
0:00 Two sum problem statement
0:21 Initial thought process
1:14 Brute-force implementation & analysis
3:03 Optimizing our initial approach
7:28 Implementing a faster algorithm
7:50 What about the one-pass approach?
8:20 Coming up with the one-pass
9:55 Why the one-pass is so awkward
12:03 The most important part

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: