I saw many programming tutorial but the level of explanation of shreesh sir is far better than anyone. so sir keep going we are with you. Dil se huge respect sir
@Pepcoding2 жыл бұрын
Glad it was helpful! Keep learning. And for better experience, visit nados.io, where you will get well curated content and career opportunities.
@pawandeepchor893 жыл бұрын
You guys are the real heros of KZbin ... Thankyou keep going strong 💪
@satyamjaiswal52512 жыл бұрын
Excellent explanation shreesh sir is gem of youtube
@codeblooded67603 жыл бұрын
Amazing Technique!!
@shreeshtripathi80823 жыл бұрын
Stay motivated, and keep learning :)
@anshikaagrawal727 Жыл бұрын
explanation is more than enough ....solution tak jane ki jarurat hi nhi h
@shreysom20602 жыл бұрын
Mast expaination wow thankyou
@MANNUMAHESH12 жыл бұрын
Really good explanation bro. Thanks a lot 🙂
@poojaraychaudhuri5933 жыл бұрын
Very well explained
@Pepcoding3 жыл бұрын
Glad it was helpful! For better experience check out nados.pepcoding.com
@rkalpeshk3 жыл бұрын
Thanks PepCoding
@sahazeerks23632 жыл бұрын
Awesome solution, why this is called chaining technique ? could you please share list of related problems
@gorakhkumargupta4912 жыл бұрын
Well explained
@Pepcoding2 жыл бұрын
Glad you love the explanation, for better experience and well curated content sign up on nados.io and start learning.
@CodingAbhay16 күн бұрын
Superb
@jasmeenkaur60012 жыл бұрын
thank you
@037_sayedramishali73 жыл бұрын
Sir aisa laga ki seedha solution bta diya intuition nhi mila bilkul
@HarendraKumar-hl8nh3 жыл бұрын
Dear SAYED, Most important think that you should care about all time is we have to make continuous paritions (chunks) so that if we sort those continuous parition then this should result in sorting the overall array. So, logic is clear, to sort the overall array ,every element wants to go to their original position that is its index position itself ( 0 wants to be on 0 th index, 1 wants to be on 1st index...and so on ) , so this technique is working in similar way as it ask every element that where it wants to go... and those element whose desire is maximum index then we would consider that elements as one chunk because we already know that inside my chunk rest of the element's desire position are not more than those of maximum index. so if we sort by considering the maximum index as one chunk then rest of the element inside the chunk will definetly go to their position . And this will result in sorting the whole array. Happy coding.
@atharvakulkarni20243 жыл бұрын
Sir, the last case that you have shown is wrong in that though u make the chunk u cant makr the array sorted.Please check
@utkarshsinghchouhan881916 күн бұрын
😃😀
@priyanshgarg12924 ай бұрын
nice
@Mrdynamics3652 жыл бұрын
can we take some randow values....
@azeemali68653 жыл бұрын
Can anyone explain the First statement of the Question
@pratikjha27423 жыл бұрын
sir wht if the chunks overlap like in 5612304
@akashtyagi93263 жыл бұрын
then whole array will be our chunk so, the answer will be 1
@letsdoeverythinginoneweek93983 жыл бұрын
isma max update hoga esa ki usa kabhi koi max mill nahi paayega max=Math.max(arr[i],max) vali condition deko broooooo 1 chunk banega
@martymcfly95393 жыл бұрын
what is the logic behind this chaining technique how does one think of this?
@HarendraKumar-hl8nh3 жыл бұрын
Dear Marty, Most important think that you should care about all time is we have to make continuous paritions (chunks) so that if we sort those continuous parition then this should result in sorting the overall array. So, logic is clear, to sort the overall array ,every element wants to go to their original position that is its index position itself ( 0 wants to be on 0 th index, 1 wants to be on 1st index...and so on ) , so this technique is working in similar way as it ask every element that where it wants to go... and those element whose desire is maximum index then we would consider that elements as one chunk because we already know that inside my chunk rest of the element's desire position are not more than those of maximum index. so if we sort by considering the maximum index as one chunk then rest of the element inside the chunk will definetly go to their position . And this will result in sorting the whole array. Happy coding.
@mickyman7533 жыл бұрын
just one thing ,max of the chunk when reaches it index then it marks end of that chunk
@siddharth72612 жыл бұрын
@@HarendraKumar-hl8nh Thanks Bro
@siddharth72612 жыл бұрын
@@mickyman753 Yup
@ruchitachandel23482 жыл бұрын
Ek aur sunhara mauka chunk count bhadne ka !!!! hahahaha....
@learnwithme893616 күн бұрын
you logic fail for test case [1,2,0,3] your logic give answer 3 but it must be 2
@gautamarora65563 жыл бұрын
Awesome Technique!!
@shreeshtripathi80823 жыл бұрын
Stay motivated, and keep learning :)
@gautamarora65563 жыл бұрын
@@shreeshtripathi8082 Sir please make more videos on leetcode problems, please sir.