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

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

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
@anshikaagrawal727
@anshikaagrawal727 Жыл бұрын
explanation is more than enough ....solution tak jane ki jarurat hi nhi h
@codeblooded6760
@codeblooded6760 3 жыл бұрын
Amazing Technique!!
@shreeshtripathi8082
@shreeshtripathi8082 3 жыл бұрын
Stay motivated, and keep learning :)
@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.
@jasmeenkaur6001
@jasmeenkaur6001 2 жыл бұрын
thank you
@CodingAbhay
@CodingAbhay 19 күн бұрын
Superb
@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 19 күн бұрын
😃😀
@priyanshgarg1292
@priyanshgarg1292 5 ай бұрын
nice
@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
@Mrdynamics365
@Mrdynamics365 2 жыл бұрын
can we take some randow values....
@azeemali6865
@azeemali6865 3 жыл бұрын
Can anyone explain the First statement of the Question
@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
@learnwithme8936
@learnwithme8936 19 күн бұрын
you logic fail for test case [1,2,0,3] your logic give answer 3 but it must be 2
@ruchitachandel2348
@ruchitachandel2348 2 жыл бұрын
Ek aur sunhara mauka chunk count bhadne ka !!!! hahahaha....
@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. :)
Маусымашар-2023 / Гала-концерт / АТУ қоштасу
1:27:35
Jaidarman OFFICIAL / JCI
Рет қаралды 390 М.
Max Chunks To Make Sorted | Leetcode 769
16:43
Techdose
Рет қаралды 4,3 М.
769. Max Chunks To Make Sorted | Prefix Sums | Multiple Approaches
14:09
The Skyline Problem || Leetcode
34:19
Pepcoding
Рет қаралды 18 М.
Count Inversions in an Array | Brute and Optimal
24:17
take U forward
Рет қаралды 261 М.
Max Chunks To Make Sorted - Leetcode 769 - Python
10:50
NeetCodeIO
Рет қаралды 7 М.