2 Pointers Algorithm - DSA Course in Python Lecture 12

  Рет қаралды 16,059

Greg Hogg

Greg Hogg

Күн бұрын

Пікірлер: 18
@GregHogg
@GregHogg 5 ай бұрын
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@docsmate2umass
@docsmate2umass Күн бұрын
simple and clear explanation makes this video more valuable .
@Za3DoRzX
@Za3DoRzX 23 күн бұрын
I love your explanations Greg, keep up the good work.
@BigStupidTech
@BigStupidTech 5 ай бұрын
Spitting straight value. Thanks for these
@GregHogg
@GregHogg 5 ай бұрын
It's what I do
@christianjt7018
@christianjt7018 5 ай бұрын
Great explanation, thanks a lot for sharing
@nurbekmalikov3467
@nurbekmalikov3467 2 ай бұрын
for space comp just create one iteration index like => iterator = len(num) -1 and every greater value puts original array which is num and iterator-- this is O(1) space!
@leandrormor
@leandrormor 5 ай бұрын
Thanks, your content is brilliant. I hope you'll touch monotonic stack, double heap, prefix sum...
@majestif
@majestif 5 ай бұрын
Many thanks for a great explanation!
@GregHogg
@GregHogg 5 ай бұрын
You're very welcome 🥰
@helloworldcsofficial
@helloworldcsofficial Ай бұрын
Thanks! Will there be more easy and medium problems where we can I apply the two pointer (indices) technique?
@MrTo1223
@MrTo1223 4 күн бұрын
Hi greg can I just change th3 conditions to append the smallest of the squares of the left and right pointers?
@izzya1282
@izzya1282 3 ай бұрын
Perfectooo amigo
@ryanlalliss5977
@ryanlalliss5977 5 ай бұрын
Sorry if this is stupid but why not use the insert method instead of append rather than reverse the array at the end?
@GregHogg
@GregHogg 5 ай бұрын
That will be inefficient because inserting at beginning is slow
@timkvernen4852
@timkvernen4852 4 ай бұрын
It's not accurate to say that the biggest values are on the outside. The second biggest value could be the second or second-to-last element. It would be accurate to say that the biggest value will always be on the outside.
@abodora532
@abodora532 5 ай бұрын
hmm, but what if they weren't in non decreasing order
@divyanshsingh6668
@divyanshsingh6668 5 ай бұрын
Sort
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
Two Pointer Algorithm | Two Sum Problem | Solve DS Problems in O(N) Time
19:18
JAVAAID - Coding Interview Preparation
Рет қаралды 122 М.
How to Use the Two Pointer Technique
10:56
Team AlgoDaily
Рет қаралды 115 М.
L1. Introduction to Sliding Window and 2 Pointers | Templates | Patterns
36:55