Тёмный

Next Permutation - Intuition in Detail 🔥 | Brute to Optimal 

take U forward
Подписаться 623 тыс.
Просмотров 328 тыс.
50% 1

Problem Link: bit.ly/3WOGkjH
Notes/C++/Java/Python codes: takeuforward.org/data-structu...
We have solved the problem, and we have gone from brute force and ended with the most optimal solution. Every approach's code has been written in the video itself. Also, we have covered the algorithm with intuition.
Full Course: bit.ly/tufA2ZYt
You can follow me across social media, all my handles are below:
Linkedin/Instagram/Telegram: linktr.ee/takeUforward

Опубликовано:

 

22 мар 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 506   
@takeUforward
@takeUforward 10 месяцев назад
Please watch our new video on the same topic: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JDOXKqF60RQ.html
@shreyxnsh.14
@shreyxnsh.14 7 месяцев назад
this is the same video??
@Tan_cannon
@Tan_cannon 3 месяца назад
areee
@moulikjindal9869
@moulikjindal9869 2 месяца назад
thanks for the vid😄😄😄😄
@kj5215
@kj5215 9 месяцев назад
Brute -> 3:25 Optimal -> 7:35 obj2: 16:14 logic summary: 18:57 algo 19:31
@nitinsharma7251
@nitinsharma7251 Месяц назад
your're time saver thanks bro
@takeUforward
@takeUforward Год назад
Let's march ahead, and create an unmatchable DSA course! ❤ Use the problem links in the description.
@leoved1073
@leoved1073 Год назад
Thanks bhaiya, great explaination.
@leoved1073
@leoved1073 Год назад
I was waiting for this video I know you are busy but please try to upload alternate days....
@leoved1073
@leoved1073 Год назад
** Timestamps ** 0:42 Explaination of what problem says 3:26 Brutforce approach 6:45 Better approach 7:22 Optimal approach 24:58 Code
@takeUforward
@takeUforward Год назад
@@leoved1073 I was not doing well, the body took a toll.
@vishal_s583
@vishal_s583 Год назад
Great explanation ❤️
@itzmartin20
@itzmartin20 10 месяцев назад
Your intuition approach is so good that I'm afraid can not find anywhere on the internet, some programming education nowadays is kind of distorted by just do it for trend and profit. High quality and dedicated contents are so underrated in my opinion. Again thanks a billion for your great work and dedication! Understood!
@riyadhossain1706
@riyadhossain1706 Год назад
Truly, humans like you are so much talented and generous to share their knowledge.
@parthsalat
@parthsalat Месяц назад
And AGI won't be this generous 🔥
@priyankavasam8769
@priyankavasam8769 Год назад
Understood very well. This is the ultimate sheet everyone needs!! Thank you for making such kinda premium content for absolutely free🤩🤩🤩
@chaitanyabalanagu626
@chaitanyabalanagu626 Год назад
Just in case ur confused, //find the first adacent pair from right side where left is smaller than right //if you dont find such a pair, reverse the whole array //swap the left element in the pair with the smallest element greater than that to its right //then reverse the sub array from the point of swap(after the left element in the pair) till the end
@shekharsharma3331
@shekharsharma3331 8 месяцев назад
Very good understanding, but in last point you should edit reverse to sort. Because you should sort the sub array from the point of swap(after the left element in the pair) till the end and not reverse from that point. Cause you need the smallest value from those numbers. Not something random by revrseing them.
@kk420100
@kk420100 Месяц назад
@@shekharsharma3331 no need of sorting because after swapping also this part of the array is still sorted. No point of sorting it again
@abhaypandey5933
@abhaypandey5933 Год назад
I appreciate your hard work, thanks for making these valuable videos for free.
@habeeblaimusa4466
@habeeblaimusa4466 Год назад
I have been on your page for the past couple of days. Thanks for all you do we miss you
@DevashishJose
@DevashishJose Год назад
Understood. Thank you so much for your dedication strive it is very inspiring, I am solving this at 12:02 on a sunday night because I have seen how hard you work to produce these videos, Thanks a lot.
@maneeshapanu
@maneeshapanu Год назад
The best explanation I could have ever asked for. Thank you, Sir.
@jatinsharma1595
@jatinsharma1595 7 месяцев назад
Understood. A very good lecture tbh, the way you walked us through the approach, just loved and enjoyed it. Thanks Striver
@cinime
@cinime Год назад
Understood! Wow!! Super amazing explanation as always, thank you very very much for your effort!!!
@muktarsayeed9198
@muktarsayeed9198 Год назад
Your explanation was excellent 👍👍👍🙏🙏🙏 but what I find more impressive is you can do this at 3am in the morning 👍👍👍👍
@user-cp3rc3yp2s
@user-cp3rc3yp2s 6 месяцев назад
He doesn't live in india it might be 10 pm for him
@MrOO-ix5qr
@MrOO-ix5qr 11 месяцев назад
a channel which can be subscribed without any hesitation or doubt. loving the depth of explanation ❤
@krugerbrent4270
@krugerbrent4270 9 месяцев назад
Wow, hats off! This is one of the best explanations, that got through my head. Thanks man.
@komalkrishna7836
@komalkrishna7836 Год назад
Understood!! Nicely explained Striver!! Thank you so much 😊
@Alex-ve9dw
@Alex-ve9dw Год назад
waited for this question's intuition video thank you striver for doing this.
@atharvagarwal2067
@atharvagarwal2067 7 месяцев назад
Hats down the best video on this topic on the entire internet, was never able to understand this problem but after watching this video everything became so easy.
@sumithst2386
@sumithst2386 11 месяцев назад
What a great explanation! Crystal clear!❤
@joeljacob4685
@joeljacob4685 Год назад
Hey!! Thank you so much for your awesome explanations . I really understood the intuiton and the problem was awesome too .. Waiting for your further lectures !!
@Dhruv-od3tc
@Dhruv-od3tc 11 месяцев назад
Man Your teaching is fantastic even after buying a course for dsa i wasn't able to understand concept this better that you are providing free. Such A Gem Teacher....!
@dhruvsolanki4473
@dhruvsolanki4473 Год назад
Very well explained the intuition and how the algorithm works, thank you for your great efforts.
@Raj10185
@Raj10185 Год назад
LIiterally the observation you tried to explain is superb and code it my own once observation is clear cut anyone can code it by its own if he know programming language.
@tahaansari5621
@tahaansari5621 Год назад
Have been waiting for ur video for the past 3 days
@RamKumar-dm6es
@RamKumar-dm6es Год назад
Great content with complete explanation, You explain the algorithm from basics
@prankishoriitkgp3772
@prankishoriitkgp3772 Год назад
very well explained I just loved it Highly influenced by the intuition and the way he taught in the lecture😘
@RahulBisht_001
@RahulBisht_001 2 месяца назад
Truly admirable! Your dedication level is worth emulating.
@gurdittsingh6638
@gurdittsingh6638 Год назад
Absolutely amazing explanation of the intuition
@rohitsoni3710
@rohitsoni3710 5 месяцев назад
Best explaination of this question in coding community.No one can explain intitution as striver can explain . striver you are legend.
@adarshrishu7972
@adarshrishu7972 2 месяца назад
What a wonderful explanation, thank you so much for explaining everything from one corner to another. ❤
@pragatisrivastava8051
@pragatisrivastava8051 Год назад
I have always tried to avoid this question because I was unable to digest its solution, but I will recommend all the new users to please watch the solution till end, you will get to know why Striver is the God of coding world. Wonderful channel , wonderful content... To all my fellow learners : Bus yahan se padhlo naukari pakki hai tumhari!! Naukri hai toh promotion pakka!!! Thank you v. much Striver
@savage4493
@savage4493 Год назад
avoid this question so do you mean that you try and solve the qsns before watching tutorials? is that the right approach?
@pragatisrivastava8051
@pragatisrivastava8051 Год назад
@@savage4493 No, because I was not able to grasp the knowledge, I just used that Stl library to solve this, but now I'm confident enough to write its logic.
@harsha4048
@harsha4048 Год назад
Can you explain the logic of the code 21:32
@yumevibes1303
@yumevibes1303 Год назад
​@@harsha4048 first you are looping from backward and checking condition a[ i ] < a[ i+1 ] (so here is dry run a[ i ] < a[i+1] == a[ 4 ] < a[5 ] hear 4 and 5 are index which means a[ 4 ] = 3 and a[5 ] = 0 that means 3 < 0 ( hear its not meet the if condition so it wont go inside the if block ) it will satisfy the if condition only at index 1 { a[1] = 1 and a[i +1 ] = 5} , i hope you get it..
@Fe-ironman
@Fe-ironman 6 месяцев назад
wow seeing all the comments i am very glad i got stuck in this problem and gave 2 days of time to think solution of this problem on my own on free time while also solving other problems, and got the exact approach on my own lol idk how @@pragatisrivastava8051
@113_manshi4
@113_manshi4 Год назад
The question was quite complex, but you made it easy, Thank you!
@MANISHKUMAR-th4zq
@MANISHKUMAR-th4zq Год назад
Superb explaination !! Speciality of striver bhaiya is that he focus more on the intution than algorithm. Thanks bhaiya
@nishantagarwal2289
@nishantagarwal2289 10 месяцев назад
Understoooood 😃. Learning DSA from u is so easy and fun Hats off to you striver
@satyam_sundaram
@satyam_sundaram Год назад
WOW! What an explanation! Genius.
@joydeepsarkar4774
@joydeepsarkar4774 10 месяцев назад
This guy is a legend
@utsavseth6573
@utsavseth6573 Год назад
Damn, dude, that explanation was just simply on some next level.
@AbdullahKhan-et6qo
@AbdullahKhan-et6qo Год назад
Great explanation of the intuition, Understood 🔥
@vijaiganeshh1346
@vijaiganeshh1346 3 месяца назад
Really thankful and appreciate ur effort striver thanks a million! 👏
@rehanhussan
@rehanhussan 9 месяцев назад
Feel a gaya concept smajh kar... best explanation thank you bhaiya
@manvendrasinghrathore8100
@manvendrasinghrathore8100 6 месяцев назад
What a explanation skill you have bro. Thanks for quality content .
@shyren_more
@shyren_more Год назад
Appreciate your hard work!
@Manishgupta200
@Manishgupta200 Год назад
That's really fantastic. Amazing 🔥🔥Thankyou Striver. Leetcode problem is done by myself.
@vm1662
@vm1662 9 месяцев назад
Hey Striver, the explanation is amazing. Thank you so so so much!! I wonder how you come up with these ways to explain 😅
@sourabhtiwari5137
@sourabhtiwari5137 4 месяца назад
i was not getiing the problem but now just one thing, u r just awesome
@drishtirai864
@drishtirai864 8 месяцев назад
Understood 👍Thank you so much Striver !☺
@prabhakaran5542
@prabhakaran5542 7 месяцев назад
Understood Bro! Heartful Thanks for you!
@parthkandwal8343
@parthkandwal8343 Год назад
Understood bhaiya. Hats off to your dedication.
@Raj10185
@Raj10185 Год назад
Understood everything literally amazing explanation bhai :)
@mehraritvik
@mehraritvik 7 месяцев назад
love your tutorials man hats off
@purvi9958
@purvi9958 Год назад
nicely explained...thankyou for such an elaborate explanation!
@rajdeepsingh3130
@rajdeepsingh3130 Год назад
Concept is superb explain...I pause the video in middle of it press the like button and then continue..👍
@ArvindSingh-wj7vy
@ArvindSingh-wj7vy 4 месяца назад
At first, it was difficult to understand but after watching it again, it is crystal clear
@stith_pragya
@stith_pragya 2 месяца назад
Understood...Thank You So Much for this wonderful video......🙏🙏🙏
@AayushDubey_007
@AayushDubey_007 Год назад
Your videos are just amazing and helpful
@chiragarya4201
@chiragarya4201 Год назад
One of the best explained solution. Thanks for the content
@mohammadaquib-computerscie1673
Thanks a lot for an awesome course God bless you
@saliqgowhar395
@saliqgowhar395 Год назад
absolutely brilliant !
@seturaj64
@seturaj64 3 месяца назад
Best Explanation Ever.. Thank You So Much for all the Efforts. 🍀❤🔥🔥
@shariyarshajid
@shariyarshajid 11 месяцев назад
Thanks a lot, brother. Love and Respect from Bangladesh
@brindhadhinakaran9672
@brindhadhinakaran9672 Год назад
Very nicely done Striver !!!
@naveensaicremsiyadlapalli3769
amazing explanation , you nailed it.
@Nishantkumar-oh9th
@Nishantkumar-oh9th Год назад
Understoood....This video was much awaited..
@film_fam-zn9mg
@film_fam-zn9mg Месяц назад
What an explaination, loved the way Striver explains
@prakritisagar5007
@prakritisagar5007 5 месяцев назад
Thank you for making it super easy to understand!
@adebisisheriff159
@adebisisheriff159 8 месяцев назад
@striver, you are a God in DSA. I Salute you bro!!! Thanks for all you do for us
@sachinboreoffl
@sachinboreoffl 5 месяцев назад
This is one of the best Logic I came across
@prathamvardaan4187
@prathamvardaan4187 18 дней назад
amazing explanation . the way you explained it is phenomenal.
@DR-mq1le
@DR-mq1le Год назад
understood, extremely good explanation!
@DeepakSharma-de6uk
@DeepakSharma-de6uk Месяц назад
Excellent intuition building teaching... Salute to the hard work.🧑‍💻
@sukhpreetsingh5200
@sukhpreetsingh5200 Год назад
Amazing Explanation ❤
@bhanuprakashn6881
@bhanuprakashn6881 6 месяцев назад
by the way your explanation is truly amazing..!!!
@35-ekta94
@35-ekta94 9 месяцев назад
Thanks for sharing the intuition. It's really helpful.
@torishi82
@torishi82 18 дней назад
Amazing work. Thanks.
@acharan7973
@acharan7973 8 месяцев назад
Your way of explanation and delivering the way to solve the problem gives me a perfect idea on how to solve the problem without seeing the coding part. Thank you bhaiya for such an amazing series.😄
@atishayharsola496
@atishayharsola496 Год назад
Great Course Thanks Striver Bhaiya
@abhaysinghrathore3192
@abhaysinghrathore3192 Год назад
Kya hi samjhaya hai bhai. Killed it.
@shreyasdeshpande6653
@shreyasdeshpande6653 4 месяца назад
understood , this is the best channel ever.
@stelarfox
@stelarfox Год назад
Very well explained. Thank you.
@AdityaKumar-be7hx
@AdityaKumar-be7hx Год назад
Had to go over it twice but understood it now!
@jayanthvanamamala1425
@jayanthvanamamala1425 Год назад
striver bhaiya .. uh are great thanks for giving us this lecture
@vagabondfoodie5788
@vagabondfoodie5788 Год назад
I did the same problem from your sde sheet but implementation was bit hard there 🙃🙃now it's like cake walk ❤❤❤❤ thankyou #striver🎉
@ayushgarg05
@ayushgarg05 6 месяцев назад
Very very easy to understand. Great explanation. Thanks a lot.
@venup2813
@venup2813 5 месяцев назад
Your explanation is so good,I can understand easily👌🔥
@vinaymocharla1223
@vinaymocharla1223 14 дней назад
Thank you striver for explaining this hard problem
@k.satish3663
@k.satish3663 Год назад
awesome teaching.Thank you very much.
@prabhagaikwad4849
@prabhagaikwad4849 Год назад
I am beginner at DSA and I have gone through the same problem of yours from Array series 2-3 times but intuition was not being clear. But this video has cleared in first few minutes. Thank you so much. This A2Z DSA course is world's best course. You have made one the complex topic in IT industry very easy for the world.😍
@yashpaunikar671
@yashpaunikar671 6 месяцев назад
Did you finish this A2Z DSA Series..?
@tawkeer4
@tawkeer4 6 месяцев назад
This was explained very beautifully. Thanks striver
@rohan8758
@rohan8758 6 месяцев назад
Hi Raj Bhaiyan, Here I am watching till at 1:35 AM since last 1.5 hrs, Great intuition you build before teaching algorithms directly. That's a great way. If i will teach algorithm to anyone i will follow the same approach. 🙏🙏
@ritikasinha6929
@ritikasinha6929 Год назад
You are just amazing Striver😌
@myyoutubeisthis
@myyoutubeisthis 2 месяца назад
Thank you sir for this amazing solution.
@snehaprasad5785
@snehaprasad5785 13 дней назад
thank you so much for your efforts sir
@rohithsharma9608
@rohithsharma9608 9 дней назад
This was great explanation, helped me a lot...
@srinivasmadupada4519
@srinivasmadupada4519 Год назад
I was sure that it was the best channel for DSA 100%
@souvikmukherjee8245
@souvikmukherjee8245 Год назад
wow. amazing explanation dada. understood
@omsatpathy5455
@omsatpathy5455 Год назад
the god of explaining complex algos..🙏🙏🙏
@myyoutubeisthis
@myyoutubeisthis 22 дня назад
Thank you sir for this awesome concept
@Unstoppable.Sakshi
@Unstoppable.Sakshi Год назад
Thank You so much !!! Understood
@technojam5944
@technojam5944 Год назад
BEST EXPLANATION mjja aa gya 🔥
Далее
These Roblox Players Just Got Their PC's Hacked...
10:38
Please Master These 10 Python Functions…
22:17
Просмотров 101 тыс.
Coding Interviews Be Like
5:31
Просмотров 6 млн