Next Permutation - Intuition in Detail 🔥 | Brute to Optimal

preview_player
Показать описание


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.

You can follow me across social media, all my handles are below:

Рекомендации по теме
Комментарии
Автор

Brute -> 3:25
Optimal -> 7:35 obj2: 16:14 logic summary: 18:57 algo 19:31

kj
Автор

Let's march ahead, and create an unmatchable DSA course! ❤

Use the problem links in the description.

takeUforward
Автор

Truly, humans like you are so much talented and generous to share their knowledge.

riyadhossain
Автор

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!

itzmartin
Автор

Your explanation was excellent 👍👍👍🙏🙏🙏 but what I find more impressive is you can do this at 3am in the morning 👍👍👍👍

muktarsayeed
Автор

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

chaitanyabalanagu
Автор

Understood very well. This is the ultimate sheet everyone needs!! Thank you for making such kinda premium content for absolutely free🤩🤩🤩

priyankavasam
Автор

I have been on your page for the past couple of days. Thanks for all you do we miss you

habeeblaimusa
Автор

I appreciate your hard work, thanks for making these valuable videos for free.

abhaypandey
Автор

The best explanation I could have ever asked for. Thank you, Sir.

maneeshapanu
Автор

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.

DevashishJose
Автор

Best explaination of this question in coding community.No one can explain intitution as striver can explain . striver you are legend.

NinjaDevPlays
Автор

He is made for this ...

Striver!! Truly you are made to teach DSAlgos!!!!

Hats off ❤

ankitamishra
Автор

waited for this question's intuition video thank you striver for doing this.

Alex-vedw
Автор

a channel which can be subscribed without any hesitation or doubt. loving the depth of explanation ❤

MrOO-ixqr
Автор

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

pragatisrivastava
Автор

At first, it was difficult to understand but after watching it again, it is crystal clear

ArvindSingh-wjvy
Автор

Understood! Wow!! Super amazing explanation as always, thank you very very much for your effort!!!

cinime
Автор

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.😍

prabhagaikwad
Автор

Directly went into my brain. Thank You So Much for your clear understanding!

abhishekshimpi