Two Sum - LeetCode 1 - Python (2 Ways!)

Опубликовано: 02 June 2026
на канале: Deepti Talesra
15,211
181

Explaining the very first problem on leetcode - Two Sum (2 Sum) in Python!

Code: https://github.com/deepti-talesra/Lee...

@2:27 - Brute force O(n^2) approach
@3:48 - Code (n^2) approach
@5:14 - Code walk-through with example (n^2) approach
@7:49 - Hashmap O(n) approach
@9:22 - Code (n) approach
@10:58 - Code walk-through with example (n) approach
@13:26 - Time and Space complexity

Give it a shot yourself - https://leetcode.com/problems/two-sum/

Music: Bensound

Lemme know if you have ANY questions or comments at alll!:)

If you found this helpful, check out my channel for even **MORE VIDEOS**!!:)) https://www.youtube.com/c/DEEPTITALES...