514. Freedom Trail | DP | Dijkstras | Top-Down | Bottom-Up | Bottom-Up Optimized

  Рет қаралды 3,912

Aryan Mittal

Aryan Mittal

Күн бұрын

In this video, I'll talk about how to solve Leetcode 514. Freedom Trail | DP | Dijkstras | Google | Top-Down | Bottom-Up | Bottom-Up Optimized
Let's Connect:
📱Discord (Join Community) : / discord
📝Linkedin: / aryan-mittal-0077
📸 Instagram: / ez.pz.dsa
💻 Twitter - / aryan_mittal007
🤖 Github: github.com/ary...
About Me:
I am Aryan Mittal - A Software Engineer in Goldman Sachs, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)
✨ Hashtags ✨
#programming #Interviews #leetcode #faang #maang #datastructures #algorithms

Пікірлер: 31
@ARYANMITTAL
@ARYANMITTAL 9 ай бұрын
Sorry, a lot of things happened in today's video & a lot of people came in frame too🥲🥹
@nothingmuch140
@nothingmuch140 9 ай бұрын
NO PROBLEM BRO✨✨
@shivamdashore6864
@shivamdashore6864 9 ай бұрын
The wait is over. Thanks, bro!
@prashant1049-y4h
@prashant1049-y4h 9 ай бұрын
The behavior you exhibited is not acceptable. Please be careful to avoid repeating it in the future.
@johnj171
@johnj171 6 ай бұрын
@@prashant1049-y4h lamo 😂😂
@johnj171
@johnj171 6 ай бұрын
hy thanks for explaining Great job
@tasneemayham974
@tasneemayham974 9 ай бұрын
AMAZZINNNGGGG!!! The vid was 48 minutes. But I spent 3 hours analyzing and taking notes!! Thank you Aryan, bro!!
@nikhilkumarpradhan4276
@nikhilkumarpradhan4276 9 ай бұрын
Dijkstras👏👏👏👏Thankuu bhaiya
@aditimahabole1761
@aditimahabole1761 9 ай бұрын
bro how do you get time , like are you working in company also ? or you are dedicating you time to videos only ... just asking for time management.
@jatishay26
@jatishay26 9 ай бұрын
Amazing video. Keep it up
@akshaysoni5223
@akshaysoni5223 9 ай бұрын
Great Explanation 👍
@IndaramKumawat-sr2mk
@IndaramKumawat-sr2mk 9 ай бұрын
why did the greedy will not work well in this problem please will you explain it
@aniketsinha101
@aniketsinha101 9 ай бұрын
Thanks for making complicated problem more complicated then it seems. I mean i always suggest, not to get spooked by hard problem. First will be not to think dynamic programming for hard problem, Start with recursion, then memoize, and then tabulate. Its fine, if you are getting TLE, or its below average solution. Build a recursive solution -> if the index is greater than key, we return 0 your helper function will look like this (String ring, String key, int pointer, int index) index will be used for traversal for the next character in the key. pointer indicates the current location in the ring string assume step to be maximum. we will put a for loop to traverse the ring. (i to ring size) If the ring index is equal to key index, then steps will be minimum of steps or, abs(i-ptr), or n- abs(i-ptr)+1+ call the recursion with pointer,index +1. return steps at the end at the end just create a dp, add two line code to memoize it
@aastikofficial6100
@aastikofficial6100 9 ай бұрын
ys you are right
@sanskardhyani4112
@sanskardhyani4112 9 ай бұрын
awesome video bhaiya
@adityamehta543
@adityamehta543 9 ай бұрын
bro, please add the code solution in the description as well
@chetan.s.bandurkar2690
@chetan.s.bandurkar2690 9 ай бұрын
aj ke biweekly ke problem ke solution upload krna bhaiya 27-04-24 vale eke,,3rd and 4th specialy
@rm0ndo
@rm0ndo 8 ай бұрын
Quick note if you're doing the space optimized version and using Java... change prevDp = curDp to prevDp = curDp.clone()
@Anonymous____________A721
@Anonymous____________A721 9 ай бұрын
Oh my god Thanks
@ajayc815
@ajayc815 9 ай бұрын
Understood
@tanyaraj3129
@tanyaraj3129 9 ай бұрын
maksad nahi bhulna was something personal to say
@satwiktatikonda764
@satwiktatikonda764 9 ай бұрын
thanks for explaining wch loop comes first ...we usually write state1 in memo as loop1 and state2 as loop 2 but here its not the case
@shivchauhan795
@shivchauhan795 9 ай бұрын
Hi, mujhe dp vaale question bohot jada mushkil lg rhe hain. Baaki questions trees, graph isse bohot easy lgte hain but dp hi nhi samajh aati. Aryan, can you help me tell me how can I overcome this. Please reply.
@gyanendrasingh6822
@gyanendrasingh6822 9 ай бұрын
practice more recursion problem so you will be easily understanding dp.
@aastikofficial6100
@aastikofficial6100 9 ай бұрын
Bro dont go for longer videos for watch time you can simply explain it bhai tum over kr dete ho complicated ko or complicated kr dete ho agr simply smghaoge jyada confuse nhi kroge to apne aap views aayenge tum hr video ko lamba kichte ho or complicated krte rhte ho ig i am right if not correct me here
@VishalKumar-lw3yh
@VishalKumar-lw3yh 9 ай бұрын
go and watch solution which is 15 min long and dry run on a example then code it and u rote it. u know why does it take 40 plus min cuz he gives intution, he proves why a solution works and other not, then comes to the solution.
@aastikofficial6100
@aastikofficial6100 9 ай бұрын
@@VishalKumar-lw3yh ya i already watched it and code it morever easy to understand
@vinaychauhan2110
@vinaychauhan2110 9 ай бұрын
Because it is necessary for noob like me😅
@AYJ959
@AYJ959 9 ай бұрын
Its easy to make a 15 min video and get more views and also he explained 4 solutions. what you want 4 approaches of dp & graph in 15 min video?
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Backward Chaining: How To Get Successful In Reverse
5:49
Freedom Trail - Leetcode 514 - Python
25:18
NeetCodeIO
Рет қаралды 14 М.
827. Making A Large Island | DFS | Connect Components
19:11
Aryan Mittal
Рет қаралды 1,5 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 694 М.