Really a good explanatory video but it would be more better if you put a link of the code explained in the video, as it would be difficult for us to find code of such beautifully explained algorithm. Thanks Again...
I want to work as a data scientist or machine learning engineer, and preparing for job interview. Your videos help me a lot, however 'Graph' is new to me.
Another Solution in just O(n) and Easy to Understand: int minJumps(int arr[], int n){ // Your code here if(arr[0] == 0) return -1; else if(n == 1) return 0; int dest = 0, pos = 0, jumps = 0; for(int i=0; i
Sir, I was struggling for understanding this problem. I even tried 3-4 video lectures of different people but still I can't get it. But the way you explained this problem hit directly in my brain and finally I find it very easy. Many Many thanks for your explanation and efforts. God bless you always.
Something about your explanation really clicked we me. Since we haven't learned the technique of using infinity in my class, I instead used None and added a couple if statements :)
Really love your video for this topic! I think you are the only one who teaches step by step and I totally understand DP solution for this problem, thanks for your efforts and wish all the best:)
sir aapka code itna simple aur chota tha...aur mene code likhne me 2 din laga diya phir bhi solution nahi nikala....phir aapka code dekha...aur bht hasi aayi itne simple code ke liye me najane kya kya kr raha tha😂😂
Sir please put up more videos on dp It was very helpful. Ur way of explanation is very good I was able to solve codeforces problems related to dp Plz sir
To reduce the number of iterations, I think we can directly start index j from jump_path_arr[i-1] and check if i is reachable and increment j from there.
Please help if you can design some optimised algorithm for below problem statement. You have synonyms for words stored in dictionary/map like HashMap synonyms = new HashMap() synonyms.put(“tree”, “tree1") synonyms.put(“far tree”, “tree2") You have to replace the word present in input string with the value corresponding to the key present in the map. Input: I saw a far tree near the old tree Output: I saw a tree2 near the old tree1
Nice algorithm, but you can improve the run-time by putting a break; after the first updating of any element. This because its impossible to improve the number of the jumps by using an index that com after it.
Can u pls solve this in O(N) TC ans O(1)SC .. thx fr the great video ... even though i know the solution i always come to ur channel to watch the solution bcoz ur explanations are great..
The algorithm could fail in many uncommon scenarios like {1, 0, 3, 5}. Algorithm explained is pretty straightforward , but it lacks accommodating few exceptional cases.
Super awesome explanation. The answer to the problem is explained on geeksforgeeks.org but I never understood it even after trying to debug the code multiple time. This is a lengthy video but it was well worth my time understood it in an instant. The only problem is its not the most optimal solution even in DP :(
Minimum sum partition(Given an array, the task is to divide it into two sets S1 and S2 such that the absolute difference between their sums is minimum.) video on this topic.. please upload asap...thanks in advance:)
Watched everybody's explanation whole day I searched but I finally understood yours
u really patiently explain all solutions...thanks
U actually teach very well.and that clearly explains that u have the feel of DP
In ur videos pls consider to mention the time and space complexity also. Helps greatly to judge the method.
Agreed. Otherwise, they are excellent. Thank you.
o(n^2)
Yes , exactly
I was struggling a lot with this problem. Thank you for explaining so thoroughly.It is helpful after 100 years also..
I was struggling a lot with this problem. Thank you for explaining so thoroughly.
This is the most thorough explanation I have seen. Thank you.
I was stucked at this problem for a whole day but now I got it completely .Thankyou!!
i am always so happy, whenever i search for a problem and u have a solution, u give the best explanations
my dynamic programming grip is now awesome,,thanks to u sir
The best explanation for the problem , huge respect sir
Really a good explanatory video but it would be more better if you put a link of the code explained in the video, as it would be difficult for us to find code of such beautifully explained algorithm. Thanks Again...
Your channel is great. Please continue uploading videos. Your presentation and way of teaching is amazing. Keep up the good work.
i watched a 1000 videos on this question and this video just explained it so easily , thanks
This same question was asked in Goldman Sachs internship written paper.
At that i was unable to solve ,but now i can.
Thank you.
I want to work as a data scientist or machine learning engineer, and preparing for job interview. Your videos help me a lot, however 'Graph' is new to me.
A few changes to make it O(n) instead of O(n^2) :)
jump(vector &a) {
int n=a.size();
if(n
Also you could have done early return whenever dp[j] is filled where j has reached n-1.
Another Solution in just O(n) and Easy to Understand:
int minJumps(int arr[], int n){
// Your code here
if(arr[0] == 0)
return -1;
else if(n == 1)
return 0;
int dest = 0, pos = 0, jumps = 0;
for(int i=0; i
Thank you very much!!! Such a mind blowing and easy concept.
Jump= -1;
Sum=0;
While (sum=n){
jump++;
}
cout
Sir, I was struggling for understanding this problem. I even tried 3-4 video lectures of different people but still I can't get it. But the way you explained this problem hit directly in my brain and finally I find it very easy. Many Many thanks for your explanation and efforts. God bless you always.
same here bro😄
Your explanation are detailed ad very very easy to understand keep up the good work buddy !
sir you expalain too good ...i was searching for the channel like yours for two week, finally i got your channel ....SUBSCRIBED SIR
Something about your explanation really clicked we me. Since we haven't learned the technique of using infinity in my class, I instead used None and added a couple if statements :)
Super Detailed explanation. Really helpful.
Really love your video for this topic! I think you are the only one who teaches step by step and I totally understand DP solution for this problem, thanks for your efforts and wish all the best:)
Thanks Vivekanand Khyade you rock as always.
You are indeed the best teacher for algorithm .
greatest tutorial i've ever seen. Keep it up
very good and thorough explanantion. Keep it up sir. But just try to explain complete code also along with explanation
Great video, but one point to note is that it will fail for some corner cases like--> arr[]={0,1,1,1,1}. This doesn't has any solution
Really nice explaination for a beginner like me,thanks sir
sir aapka code itna simple aur chota tha...aur mene code likhne me 2 din laga diya phir bhi solution nahi nikala....phir aapka code dekha...aur bht hasi aayi itne simple code ke liye me najane kya kya kr raha tha😂😂
Hats off to your explanation sir great video sir
As usual always the best explanation.
very good explanation .. really liked your way of teaching
i hit the bell icon now
Sir please put up more videos on dp
It was very helpful.
Ur way of explanation is very good
I was able to solve codeforces problems related to dp
Plz sir
He is a amazing teacher(from a leaner in China)
CCP has blocked RUclips in china!,you use VPN or live in india istead?
@@Aryansingh-fk7hy I'm living US
@@yidonghuang3280 fortunate you are!!.
One minute was enough to make a comment about the video. Loved it.
the best explanation for this problem
best explaination i have ever seen for this problem , thanks a lot !!!
excellent explanation. very thorough
brilliantly explained sir
You made my day!! Thank you great explanation. Video answered all my doubts. It would be more useful , if you could give intuition to problem.
I really enjoyed your way of teaching ,
Thank you! 😃
I love yr videos u are the best ... please explain palindrome partitioning
To reduce the number of iterations, I think we can directly start index j from jump_path_arr[i-1] and check if i is reachable and increment j from there.
Good Explanation. Kudos Really you appreciate
Great One ! Excellent dry run..
Amazing!! after so many videos this is best
Thanks sir. You just made complex algo like kids game. Thanks a ton.
THANKS FOR SUCH A BEAUTIFUL VIDEO SIR. I GOT IT FULLY...A BIG THANKS
Excellent way of explaining algorithm
Could you please xplain the problems in cracking coding interview book... The way you xplain is easily understandable.
Please help if you can design some optimised algorithm for below problem statement.
You have synonyms for words stored in dictionary/map like
HashMap synonyms = new HashMap()
synonyms.put(“tree”, “tree1")
synonyms.put(“far tree”, “tree2")
You have to replace the word present in input string with the value corresponding to the key present in the map.
Input: I saw a far tree near the old tree
Output: I saw a tree2 near the old tree1
Very beautifully explained!!!
Awesome explanation...sir
Please add videos for different sorting algorithms. Thanks in Advance. Great work. Keep going !!
Best explanation 👍
I would add a "break;" command after the if {..}
Excelent work.. Thank you sir! This channel will definetely blow up someday
amazing explanation
great explained .. when you assigning jump path array ?
Nice algorithm, but you can improve the run-time by putting a break; after the first updating of any element. This because its impossible to improve the number of the jumps by using an index that com after it.
I am a SDE at Flipkart have a look at my DP playlist that actually landed me a great package job: ruclips.net/video/nqowUJzG-iM/видео.html
respect from China!
We thought your firewalls were difficult to be penetrated.
Amazing Explanation to the solution. But looks like this solution is too slow. How can we improve the time complexity?
superb explanation
One more check is required in if condition. Awesome explanation though. Kudos!
if( i
Very Good explanation Sir thanks
Best explanation. Thank you!
Can u pls solve this in O(N) TC ans O(1)SC .. thx fr the great video ... even though i know the solution i always come to ur channel to watch the solution bcoz ur explanations are great..
The algorithm could fail in many uncommon scenarios like {1, 0, 3, 5}. Algorithm explained is pretty straightforward , but it lacks accommodating few exceptional cases.
superb !! any real time situations where we use this logic ?
Best explanation
Too good explanation
Nicely explained...
nice explanation..
Nice explanation
Awesome Vivek!!! Great Videos. Thank you very much :-)
Super awesome explanation. The answer to the problem is explained on geeksforgeeks.org but I never understood it even after trying to debug the code multiple time. This is a lengthy video but it was well worth my time understood it in an instant. The only problem is its not the most optimal solution even in DP :(
Thank u so much sir!!! This really helped a lot...
Jordaar Uncle :)
Can you explain how the algorithm will take care of the array [0,1,1,1,1]???
Minimum sum partition(Given an array, the task is to divide it into two sets S1 and S2 such that the absolute difference between their sums is minimum.) video on this topic..
please upload asap...thanks in advance:)
Sure Anjali...Thanks for the topic....
Another excellent video.
Can you please order the dynamic programming playlist ?
This is an O(n^2) solution. Do you have O(n) solution?
Your videos are very interesting .. It would be great if could segregate your content based on context and post as modules
Hi Sir can you please explain the grid formation of Egg Dropping Problem and longest ariyhmetic sequence in DP
awesome explanation!
nice explaination
thanks for detailed explanation!
You are a boss keep the good work
thank you sir for the wonderful video.
Can you please make a video on "
Count of subarrays whose sum is a perfect square".
thanks a lot! could you please do Kruskal's MST at some point?
how to initialize entire array to infinity?
you can run a loop from 0 to n-1 and intialize array with INT_MAX in c++ or you can use vector ---------> vector (n,INT_MAX)
@@utkarshsingh3874 thanks.I knew the loop one, i was wondering if there was a shortcut.This helped :)
What a way to explain !!
Man! This is like Dijkstra. Also I dont like 'j' going back to '0' everytime you increase 'i'.
include break after the min calculation so that it immediately terminate not entirely going through all the indexes
Sir kindly make a video on Buying and selling of shares using k transactions. I am not able to understand the concept.
sir please make some videos on question asked on heaps
YOu are the BEST .