Two Sum II | LeetCode 167 | Two Pointers Explained Clearly | Easy ➜ Medium | Day 10 | 47 / 1000 🚀
Автор: leetcode Grind
Загружено: 2026-01-14
Просмотров: 6
Day 10 of my 1000 LeetCode Problems Challenge 🚀
Solved LeetCode 167 – Two Sum II (Input Array Is Sorted) using the two-pointer technique, one of the most important patterns for array problems 💪
In this video, I first explain the brute force idea, then show how the fact that the array is sorted completely changes the approach 🧠✨
Instead of checking all pairs, we use two pointers from both ends and move them intelligently based on the sum.
This problem is a perfect confidence booster and a foundation for many medium-level questions like 3Sum and sliding window problems 🔥
What you’ll understand clearly from this video 👇
👉 Why sorting enables two pointers
👉 How to move left and right pointers logically
👉 Why this runs in O(n) instead of O(n²)
👉 How interviewers expect you to think
LeetCode problem link 👇
https://leetcode.com/problems/two-sum...
Progress update 🚀
47 / 1000 problems solved
Staying consistent, learning patterns, and moving one step closer every single day 💙🔥
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: