Quick sort ek efficient sorting algorithm hai, jo divide-and-conquer approach ka use karta hai. Quick sort kaam karta hai by partitioning the array into smaller sub-arrays, sorting each sub-array, and then combining them to get the final sorted array.
Isme Pivot Element select karega , Pivot element array me se koi bhi element karega aur pivot element lene ke bad usse compare karenge partition karke
left side from pivot element is small element
and right side from pivot will be bigger element
Pivot element hamesa bigger select krenge taaki efficiency behtr aaye
Comments
Post a Comment