We hope you all are enjoying our videos!!! Don't forget to leave a comment!!! Please like the video to support us!!! Questions you might like: ✅✅✅[ Tree Data Structure] : kzbin.info/aero/PLJtzaiEpVo2zx-rCqLMmcFEpZw1UpGWls ✅✅✅[ Graphs Data Structure] : kzbin.info/aero/PLJtzaiEpVo2xg89cZzZCHqX03a1Vb6w7C ✅✅✅[ January 2021 Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2wCalBcRcNjXQ0C6ku3dRkn ✅✅✅[ February 2021 Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2wrfvII0eZQsPm-MZCmHodm ✅✅✅[ March 2021 Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2zH-YC5ZiptbAvw2QZkmyk9 ✅✅✅[ April 2021 Leetcoding Challenge] :kzbin.info/aero/PLJtzaiEpVo2z9PpcJcsl5j3RXutiTU-GB ✅✅✅[ December 2020 Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2xo8OdPZxrpybGR8FmzZpCA ✅✅✅[ November 2020 Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2yMYz5RPH6pfB0wNnwWsK7e ✅✅✅[ August 2020 Leetcoding Challenge] : kzbin.info/aero/PLJtzaiEpVo2xu4h0gYQzvOMboclK_pZMe ✅✅✅[ July 2020 Leetcoding challenges] : kzbin.info/aero/PLJtzaiEpVo2wrUwkvexbC-vbUqVIy7qC- ✅✅✅[ June 2020 Leetcoding challenges] : kzbin.info/aero/PLJtzaiEpVo2xIPptnCvUtKrUcod2zAKG ✅✅✅[ May 2020 Leetcoding challenges] : kzbin.info/aero/PLJtzaiEpVo2wRmUCq96zsUwOVD6p66K9e ✅✅✅ Cracking the Coding Interview - Unique String: kzbin.info/aero/PLJtzaiEpVo2xXf4LZb3y_BopOnLC1L4mE Struggling in a question?? Leave in a comment and we will make a video!!!🙂🙂🙂
@aswathis59025 ай бұрын
I actually fed up by not understanding the approach of left and right but unexpectedly i came across your video and now i got the idea 😻 its really helpful tqsm bro❤
@mr.streetwear5063 жыл бұрын
Thank you so much for the second approach, I was not able to grab it but after this video its crystal clear.
@strawberriesandcream2863 Жыл бұрын
was looking for a video explanation of the slope approach. thanks!!
@ragingpahadi3 жыл бұрын
Mountain Solution Explanation is Ultimate ! Aap ko koti koti pranam : ]
@AlgorithmsMadeEasy3 жыл бұрын
Thanks !!
@praveenj31123 жыл бұрын
Glad to know that second approach . Thank you so much
@AlgorithmsMadeEasy3 жыл бұрын
Happy to help!!
@atifhu2 жыл бұрын
No doubt the explanation was great, but it feels like you explained just the pattern for this question but not the inutition behind it, how and why this is greedy, and why we are getting answer. Though I appreciate for all the efforts.
@AlgorithmsMadeEasy Жыл бұрын
Good point. We will try not to repeat that in future videos.
@rupakkorde3 жыл бұрын
Mountain solution is awesome Thanks a lot for covering it.
@AlgorithmsMadeEasy3 жыл бұрын
Thanks !!
@madanmohanpachouly61352 жыл бұрын
@@AlgorithmsMadeEasy How to come up with mountain intuition in Interview , if not seen the problem before :-(.
@sufyan23172 жыл бұрын
Graph approach clearly explained here.
@PeterParker-tp6gm11 ай бұрын
Perfect explanation 🔥🔥⚡️
@rajvidesai33522 жыл бұрын
Best explanation, I just loved it !
@piyush8143 жыл бұрын
I didn't understand the 2nd solution clearly. But thanks for explaining. Others are just explaining the 1st solution only
@pramodhk27022 жыл бұрын
Ma'am could you pls explain the intuition behind the second approach? Great explanation though. Thanks
@andressalazargaleano64193 жыл бұрын
great explaination
@AlgorithmsMadeEasy3 жыл бұрын
Thanks !!
@riamonga22832 жыл бұрын
How do we get the intuition for the second approach and THE FORMULA used in it? Great content tho! Thank you 🙌🙌🔥
@tianzhengmai1369 Жыл бұрын
Sorry, could you explain the logic of the equation "candies = sum(up) + sum(down) + Max(up, down)"
@nishantgarg28152 жыл бұрын
why is Max(up, down) added ?
@shubhamlahoti97583 жыл бұрын
Why are we adding 1 in the second last line?
@AlgorithmsMadeEasy3 жыл бұрын
Because we need the data for the last mountain without skipping any point. So we take the sum of 1 to n for up and down slopes plus we add the peak which is going to be 1 greater than the point given to the max(up, down) Sum(up) + sum(down) + peak Where, peak is max(up,down) + 1 In the part inside the loop, we skip the last point of the valley so we subtract 1 from the outer formula that cancels out the +1. And we get the inner loop formula. Sum(up) + sum(down) + peak - 1 Where, peak is max(up,down) + 1 So the consolidated formula becomes Sum(up) + sum(down) + max(up, down) Hope this helps.
@shubhamlahoti97583 жыл бұрын
@@AlgorithmsMadeEasy Thank you so much for the detailed explanation! The implementation was quite tricky but you made it seem like a cakewalk :)
@AlgorithmsMadeEasy3 жыл бұрын
Happy to help !!
@rhythmbhatia89062 жыл бұрын
@@AlgorithmsMadeEasy Please try to explain the formula in the video itself! If we have to read text, then we would have visited the Discuss section itself!
@pranavsharma73612 жыл бұрын
What about slope like /\
@chaitanyakrishna77503 жыл бұрын
I know the java basics For understanding this program What I need to learn first 🥇 Anyone pls 🙏 I didn't understanding time complexity and space complexity what it is? and more dp[].. So pls suggest to learn.. ☺
@AlgorithmsMadeEasy3 жыл бұрын
The first chapter in any DSA book is always on Complexity Analysis. Start with that. You can refer to the sequence in book DSA made Easy By Narsimha Karumanchi or from Cracking the coding interview.
@venkatasriharsha42273 жыл бұрын
My suggestion is to get strong with basics and then understand time and space complexities. Solve array and loop based problems to get better logically then start with recursions, DSA and DP problems. Practice solving in leetcode and hackerrank. Hope this helps :D Happy learning