Max Chunks To Make Array Sorted | Arrays & Strings | Leetcode 769 Solution in Hindi

  Рет қаралды 20,822

Pepcoding

Pepcoding

Күн бұрын

Пікірлер: 38
@amanbabu5138
@amanbabu5138 2 жыл бұрын
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
@Pepcoding
@Pepcoding 2 жыл бұрын
Glad it was helpful! Keep learning. And for better experience, visit nados.io, where you will get well curated content and career opportunities.
@pawandeepchor89
@pawandeepchor89 3 жыл бұрын
You guys are the real heros of KZbin ... Thankyou keep going strong 💪
@satyamjaiswal5251
@satyamjaiswal5251 2 жыл бұрын
Excellent explanation shreesh sir is gem of youtube
@codeblooded6760
@codeblooded6760 3 жыл бұрын
Amazing Technique!!
@shreeshtripathi8082
@shreeshtripathi8082 3 жыл бұрын
Stay motivated, and keep learning :)
@anshikaagrawal727
@anshikaagrawal727 Жыл бұрын
explanation is more than enough ....solution tak jane ki jarurat hi nhi h
@shreysom2060
@shreysom2060 2 жыл бұрын
Mast expaination wow thankyou
@MANNUMAHESH1
@MANNUMAHESH1 2 жыл бұрын
Really good explanation bro. Thanks a lot 🙂
@poojaraychaudhuri593
@poojaraychaudhuri593 3 жыл бұрын
Very well explained
@Pepcoding
@Pepcoding 3 жыл бұрын
Glad it was helpful! For better experience check out nados.pepcoding.com
@rkalpeshk
@rkalpeshk 3 жыл бұрын
Thanks PepCoding
@sahazeerks2363
@sahazeerks2363 2 жыл бұрын
Awesome solution, why this is called chaining technique ? could you please share list of related problems
@gorakhkumargupta491
@gorakhkumargupta491 2 жыл бұрын
Well explained
@Pepcoding
@Pepcoding 2 жыл бұрын
Glad you love the explanation, for better experience and well curated content sign up on nados.io and start learning.
@CodingAbhay
@CodingAbhay 16 күн бұрын
Superb
@jasmeenkaur6001
@jasmeenkaur6001 2 жыл бұрын
thank you
@037_sayedramishali7
@037_sayedramishali7 3 жыл бұрын
Sir aisa laga ki seedha solution bta diya intuition nhi mila bilkul
@HarendraKumar-hl8nh
@HarendraKumar-hl8nh 3 жыл бұрын
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.
@atharvakulkarni2024
@atharvakulkarni2024 3 жыл бұрын
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
@utkarshsinghchouhan8819
@utkarshsinghchouhan8819 16 күн бұрын
😃😀
@priyanshgarg1292
@priyanshgarg1292 4 ай бұрын
nice
@Mrdynamics365
@Mrdynamics365 2 жыл бұрын
can we take some randow values....
@azeemali6865
@azeemali6865 3 жыл бұрын
Can anyone explain the First statement of the Question
@pratikjha2742
@pratikjha2742 3 жыл бұрын
sir wht if the chunks overlap like in 5612304
@akashtyagi9326
@akashtyagi9326 3 жыл бұрын
then whole array will be our chunk so, the answer will be 1
@letsdoeverythinginoneweek9398
@letsdoeverythinginoneweek9398 3 жыл бұрын
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
@martymcfly9539
@martymcfly9539 3 жыл бұрын
what is the logic behind this chaining technique how does one think of this?
@HarendraKumar-hl8nh
@HarendraKumar-hl8nh 3 жыл бұрын
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.
@mickyman753
@mickyman753 3 жыл бұрын
just one thing ,max of the chunk when reaches it index then it marks end of that chunk
@siddharth7261
@siddharth7261 2 жыл бұрын
@@HarendraKumar-hl8nh Thanks Bro
@siddharth7261
@siddharth7261 2 жыл бұрын
@@mickyman753 Yup
@ruchitachandel2348
@ruchitachandel2348 2 жыл бұрын
Ek aur sunhara mauka chunk count bhadne ka !!!! hahahaha....
@learnwithme8936
@learnwithme8936 16 күн бұрын
you logic fail for test case [1,2,0,3] your logic give answer 3 but it must be 2
@gautamarora6556
@gautamarora6556 3 жыл бұрын
Awesome Technique!!
@shreeshtripathi8082
@shreeshtripathi8082 3 жыл бұрын
Stay motivated, and keep learning :)
@gautamarora6556
@gautamarora6556 3 жыл бұрын
@@shreeshtripathi8082 Sir please make more videos on leetcode problems, please sir.
@shreeshtripathi8082
@shreeshtripathi8082 3 жыл бұрын
@@gautamarora6556 we are on way, stay tuned. :)
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Maximum Product Subarray - Best Intuitive Approach Discussed
20:27
take U forward
Рет қаралды 251 М.
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 145 М.
769. Max Chunks To Make Sorted | Prefix Sums | Multiple Approaches
14:09
Multiply Strings | Leetcode 43 Solution in Hindi
49:08
Pepcoding
Рет қаралды 32 М.
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 187 М.
15 Years of Software Engineer Knowledge in 1 hour 30 mins
1:30:39
Rahul Pandey
Рет қаралды 103 М.
The Absolute Best Intro to Monads For Software Engineers
15:12
Studying With Alex
Рет қаралды 677 М.