Max Chunks To Make Array Sorted - 2 | Arrays & Strings | Leetcode 768 Solution in Hindi

  Рет қаралды 16,893

Pepcoding

Pepcoding

Күн бұрын

Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. 1. Given an array arr of integers (not necessarily distinct).
2. We split the array into some number of "chunks" (partitions), and individually sort each chunk.
3. After concatenating them, the result equals the sorted array.
4. What is the most number of chunks we could have made?
Topic: #Arrays #Leftmax #Rightmin #DP
Used #DataStructure: #Arrays
#TimeComplexity: O(n)
#SpaceComplexity: O(n)
--------------------------------------------------------------
Linked Questions:
1. Max Chunks To Make Array Sorted :
---------------------------------------------------------------
For detailed information and other exercises, VISIT: www.pepcoding.com
Have a look at our result: www.pepcoding....
Follow us on our FB page: / pepcoding​
Follow us on Instagram: / pepcoding​
Follow us on LinkedIn: / pepcoding-education
----------------------------------------------------------------
#pepcoding, #leetcode, #gfg, #maxChunks, #leftmax, #rightmin, #chaining, #leetcode768, #768leetcode #hindiSolution #hindi #java
For a better experience and more exercises, VISIT: www.pepcoding.....
Have a look at our result:
Follow us on our KZbin page: / pepcoding
Follow us on our FB page: / pepcoding
Follow us on Instagram: / pepcoding
Follow us on LinkedIn: / pepcoding-education
Follow us on Pinterest: / _created
Follow us on Twitter: home
.
.
.
Happy Programming !!! Pep it up 😍🤩
.
.
.
#pepcoding #code #coder #codinglife #programming #coding #java #freeresources #datastrucutres #pepcode #competitive #competitiveprogramming #softwareengineer #engineering #engineer

Пікірлер: 37
@rahulsati5819
@rahulsati5819 2 жыл бұрын
this channel deserves 1 million subscribers
@amriteshsingh2952
@amriteshsingh2952 3 жыл бұрын
The complete playlist is awesome in terms of quality of questions and their explanation. Thanks a lot for all your efforts.
@abhiroopmokshagnabheemineni
@abhiroopmokshagnabheemineni 10 ай бұрын
Wow.. Just awesome approach. I would have never thought of it!!
@sakshamp4488
@sakshamp4488 Жыл бұрын
Love your unique and smart ways of solving problems. i was able to this on my own, but i got stuck with test cases with duplicate values,then i was able to pass all t.c on leetcode but it wasn't the best /optimized soln. after some time
@shubhamrao7100
@shubhamrao7100 3 жыл бұрын
We are loving your playlist..please increase the frequency of uploading the questions
@Pepcoding
@Pepcoding 3 жыл бұрын
Sure I will
@arslanali-vi5nj
@arslanali-vi5nj 3 ай бұрын
sir kamal kr dya hn ap ny itna acha kon samjata hn wo b hindi main ? nice
@riamonga2283
@riamonga2283 2 жыл бұрын
Great vid!! 🙌🙌
@sakshigandhi4714
@sakshigandhi4714 3 жыл бұрын
great work..God bless!!
@rajeshbiswas755
@rajeshbiswas755 Жыл бұрын
Great solution. Kind of the same as the rain tap solution.
@Gggggg172eyeyeurhuwue
@Gggggg172eyeyeurhuwue 2 жыл бұрын
Quality videos!
@faizan346
@faizan346 3 жыл бұрын
please state in the question itself from next time what complexity should we have to do. as the constraint are very loose. i did it in nlogn, dissappointment on my side. but the solution is so good thanks for that.
@sushantbhosale5792
@sushantbhosale5792 3 жыл бұрын
Awesome Explanation Thanks Sir !!!
@ashutoshhans
@ashutoshhans 3 жыл бұрын
How to think these types of solution ? Will it come with learning and recognising patterns ? Btw, This is great video.
@HimanshuSharma-ne3oh
@HimanshuSharma-ne3oh 2 жыл бұрын
maje aagye bhaiya
@KurumiddeKezia
@KurumiddeKezia 3 ай бұрын
Super❤
@ritusundaram4070
@ritusundaram4070 2 жыл бұрын
Suuperrr explaination........that why I I like pepcoding a lot 🔥🔥
@avinash-xh6qw
@avinash-xh6qw 3 жыл бұрын
thanku
@LegitGamer2345
@LegitGamer2345 3 жыл бұрын
that was smart
@Pepcoding
@Pepcoding 3 жыл бұрын
Thank you so much and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
@codingwithanonymous890
@codingwithanonymous890 2 жыл бұрын
how to build this type of intuitions
@buu4504
@buu4504 3 жыл бұрын
nic we could also do it by making new array and equating it with the given one ,sorting the new array and precomputing the sum(prefix array) of both and at any point if arr[i]==new_arr[i] we do chunks++
@Pepcoding
@Pepcoding 3 жыл бұрын
For better experience and precisely arranged videos. Visit - nados.pepcoding.com and sign up to NADOS. Don't forget to follow us on Instagram instagram.com/pepcoding/
@mohdmudassir3548
@mohdmudassir3548 2 жыл бұрын
can't we do like this. first calculate the index of next greater element for all elment in O(n). now you have the range and proceed further
@udaypratapsingh8923
@udaypratapsingh8923 2 жыл бұрын
no it may be possible that after the next greater element there is smaller element ..
@ROHITKADYANJI
@ROHITKADYANJI 2 жыл бұрын
Comes in JTG
@aahanaganjewar9951
@aahanaganjewar9951 2 жыл бұрын
Can anyone explain me why of this question?
@saunaknandi1814
@saunaknandi1814 2 жыл бұрын
Is not this a greedy approach
@letsdoeverythinginoneweek9398
@letsdoeverythinginoneweek9398 3 жыл бұрын
bhaiya yaha pa samaj nahi aaya aapna right min araya banaya ha arr.lenmgth+1 ka but aap max value store kar raha ho arr.length pa
@keshavbansal6962
@keshavbansal6962 3 жыл бұрын
kyuki usse left max kha tk calculate krna hai ek chunk complete krne ke liye yeh right min ke i+1 value se pta chlega baaki dry run se clear hojayega
@mickyman753
@mickyman753 3 жыл бұрын
last ele pr ek chunk end hoga hi hoga so we need to check/consider it separately
@nitishgoyal9910
@nitishgoyal9910 3 жыл бұрын
Sir, placements ke liye pehle FAANG list karni chaiye ya leetcode list ?
@shang_chi4651
@shang_chi4651 3 жыл бұрын
What's that leetcode list? Can you provide me the link to that, please🙏. I have heard about faang list but not about leetcode list
@pulkit2484
@pulkit2484 3 жыл бұрын
@@shang_chi4651 its below faang list on pepcoding resource page
@mickyman753
@mickyman753 3 жыл бұрын
@@pulkit2484 wo toh faanglist 2.0 hai ,usi ki baat kr rhe ho na
@pulkit2484
@pulkit2484 3 жыл бұрын
@@mickyman753 yep yep
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН
Air Sigma Girl #sigma
0:32
Jin and Hattie
Рет қаралды 45 МЛН
БОЙКАЛАР| bayGUYS | 27 шығарылым
28:49
bayGUYS
Рет қаралды 1,1 МЛН
How I Approach a New Leetcode Problem (live problem solving)
25:31
Dynamic Programming isn't too hard. You just don't know what it is.
22:31
DecodingIntuition
Рет қаралды 233 М.
Best Meeting Point | Leetcode 296 Solution in Hindi
37:46
Pepcoding
Рет қаралды 10 М.
769. Max Chunks To Make Sorted | Prefix Sums | Multiple Approaches
14:09
Lecture21: Solving LeetCode/CodeStudio Questions [Arrays]
33:32
CodeHelp - by Babbar
Рет қаралды 479 М.
Max Chunks To Make Sorted II | Stack | A Beginner's Guide
27:54
Placement Prep By Mayank
Рет қаралды 1,1 М.
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН