Master Data Structures & Algorithms For FREE at AlgoMap.io!
@breepoken42187 ай бұрын
In some ways i find you better than neetcode and other mainstream ones. Underrated and keep uploading!!
@GregHogg7 ай бұрын
That's what I like to hear 😊
@ashwanigaur18286 ай бұрын
Yes agreed..
@thotapraveenvlogs70205 ай бұрын
Super
@MegaBeastro14 күн бұрын
great video. I think what helped me visualize the 2d array solution was viewing the empty string as first row and column instead of the first characters of the strings
@jenex56083 ай бұрын
Better than neetcode in my opinion
@siddharthpradeep7 ай бұрын
Your Videos really help me learn better. Keep uploading man !
@GregHogg7 ай бұрын
Glad to hear it, will do!
@Here.s_how8 күн бұрын
can't we do it using memoization? my code runtime error
@KandadaiSrinivasaManohar6 ай бұрын
So which is best , top down or bottom up approach?
@Beeram1237 ай бұрын
This is Great video explaination of the Longest Common Subsequence problem!!BTW what are you using whiteboard drawings ?
@GregHogg7 ай бұрын
Thank you so much! And it's called Miro :)
@nice-vf4rj6 ай бұрын
Hi Greg can you do string compression? Thanks in advance!!
@SemesterAtSeaHopeful3 ай бұрын
If the recursive solution and the tabulation have the same time complexity, why is the tabulation so much faster?
@Ambatakummmmm2 ай бұрын
iteration is usually a lot faster than recursion
@Redaxi2 ай бұрын
Time complexity does not mean runtime, it simply shows how fast runtime gets bigger with respect to the input length
@shun62844 ай бұрын
I feel so noob, I can't come up with this solution on my own 😢
@GarouNguyen6 ай бұрын
bro it top left approach to bottom, why you call this bottom uo
@GregHogg6 ай бұрын
Bottom = base cases, top = n (what you desire)
@Martinnnnnn-e5s5 ай бұрын
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 😂
@SwizzRizzBizz3 ай бұрын
how are supposed to solve questions like these in an interview in a matter of minutes? These companies are just insane
@GarouNguyen6 ай бұрын
dp i j = dp i-1 j, dp i j-1 can you explain bro, i still don't unserstand
@Martinnnnnn-e5s5 ай бұрын
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
@adithyar31606 ай бұрын
you baller...❤
@GregHogg6 ай бұрын
🏀
@fantastic-b2m6 ай бұрын
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
@iancdp93 ай бұрын
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.