Longest Common Subsequence - Leetcode 1143 - Dynamic Programming (Python)

  Рет қаралды 4,316

Greg Hogg

Greg Hogg

Күн бұрын

Пікірлер: 27
@GregHogg
@GregHogg 4 ай бұрын
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@breepoken4218
@breepoken4218 5 ай бұрын
In some ways i find you better than neetcode and other mainstream ones. Underrated and keep uploading!!
@GregHogg
@GregHogg 5 ай бұрын
That's what I like to hear 😊
@ashwanigaur1828
@ashwanigaur1828 4 ай бұрын
Yes agreed..
@thotapraveenvlogs7020
@thotapraveenvlogs7020 4 ай бұрын
Super
@jenex5608
@jenex5608 Ай бұрын
Better than neetcode in my opinion
@siddharthpradeep
@siddharthpradeep 5 ай бұрын
Your Videos really help me learn better. Keep uploading man !
@GregHogg
@GregHogg 5 ай бұрын
Glad to hear it, will do!
@Beeram123
@Beeram123 5 ай бұрын
This is Great video explaination of the Longest Common Subsequence problem!!BTW what are you using whiteboard drawings ?
@GregHogg
@GregHogg 5 ай бұрын
Thank you so much! And it's called Miro :)
@shun6284
@shun6284 2 ай бұрын
I feel so noob, I can't come up with this solution on my own 😢
@KandadaiSrinivasaManohar
@KandadaiSrinivasaManohar 4 ай бұрын
So which is best , top down or bottom up approach?
@nice-vf4rj
@nice-vf4rj 5 ай бұрын
Hi Greg can you do string compression? Thanks in advance!!
@SemesterAtSeaHopeful
@SemesterAtSeaHopeful 2 ай бұрын
If the recursive solution and the tabulation have the same time complexity, why is the tabulation so much faster?
@Ambatakummmmm
@Ambatakummmmm Ай бұрын
iteration is usually a lot faster than recursion
@Redaxi
@Redaxi Ай бұрын
Time complexity does not mean runtime, it simply shows how fast runtime gets bigger with respect to the input length
@Martinnnnnn-e5s
@Martinnnnnn-e5s 3 ай бұрын
I tried to do it like Longest Increasing Subsequence. I see string 2 as an indicator of whether I can add the current letter to the subsequence in string 1. However, there might be repetitive letters and it's all too complicated to make it work so I gave up 😂
@SwizzRizzBizz
@SwizzRizzBizz 2 ай бұрын
how are supposed to solve questions like these in an interview in a matter of minutes? These companies are just insane
@GarouNguyen
@GarouNguyen 4 ай бұрын
bro it top left approach to bottom, why you call this bottom uo
@GregHogg
@GregHogg 4 ай бұрын
Bottom = base cases, top = n (what you desire)
@adithyar3160
@adithyar3160 5 ай бұрын
you baller...❤
@GregHogg
@GregHogg 5 ай бұрын
🏀
@GarouNguyen
@GarouNguyen 4 ай бұрын
dp i j = dp i-1 j, dp i j-1 can you explain bro, i still don't unserstand
@Martinnnnnn-e5s
@Martinnnnnn-e5s 3 ай бұрын
if they don't match, you want to go one step backwards, so the current LCS is the same as one step before. Either "i" "j" can go back, so we want the max of them
@fantastic-b2m
@fantastic-b2m 4 ай бұрын
am i having some misunderstanding here? the chart that i calculated myself with the same input is 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 2 2 2 0 1 1 2 2 2 0 1 1 2 2 2 0 1 1 2 3 3 0 1 1 2 3 4
@iancdp9
@iancdp9 2 ай бұрын
That's right, I'm having the same output as you, I believe Greg omitted "a"' from each strings which is why it's still 1 and not 2 in his table.
4Sum - Leetcode 18 - Two Pointers (Python)
4:05
Greg Hogg
Рет қаралды 3,1 М.
Why no RONALDO?! 🤔⚽️
00:28
Celine Dept
Рет қаралды 86 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 11 МЛН
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 8 МЛН
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33
Coin Change - Leetcode 322 - Dynamic Programming (Python)
15:27
Number of Islands - Leetcode 200 - Graphs (Python)
11:01
Greg Hogg
Рет қаралды 10 М.
Rotting Oranges - Leetcode 994 - Graphs (Python)
16:09
Greg Hogg
Рет қаралды 3,5 М.
Longest common subsequence | Leetcode #1143
18:45
Techdose
Рет қаралды 61 М.
Word Search - Leetcode 79 - Recursive Backtracking (Python)
12:24
Why no RONALDO?! 🤔⚽️
00:28
Celine Dept
Рет қаралды 86 МЛН