Array - 9: Implement Quick Sort | Quick Sort on Array

Publié le: 13 avril 2020
sur la chaîne: Coding Simplified
4,191
49

Source Code:https://thecodingsimplified.com/quick...
Solution:
we'll take a pivot point starting from start or end
Our aim is to put pivot point value to its correct location
For this we take two variable i & j
As soon as value at ith index is less than pivot point, we increase the i
Similarly as soon as value at jth index is greater than value at pivot point, we decrease the j
If i is less than j, we swap the value & when i greater than j, we swap value at pivot point & at j
When we're done with this, we recursively call with the left part & right part
At last you'll have all values as sorted

Time Complexity: O(nlog(n))
Space Complexity: O(1)

Do Watch video for more info

CHECK OUT CODING SIMPLIFIED
   / codingsimplified  

★☆★ VIEW THE BLOG POST: ★☆★
http://thecodingsimplified.com

I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 400+ videos.

★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★
https://www.youtube.com/codingsimplif...

★☆★ Send us mail at: ★☆★
Email: thecodingsimplified@gmail.com


Sur cette page du site, vous pouvez voir la vidéo en ligne Array - 9: Implement Quick Sort | Quick Sort on Array durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Coding Simplified 13 avril 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 4,191 fois et il a aimé 49 téléspectateurs. Bon visionnage!