Pivot elements understand

what is pivot element and which element to choose as a pivot element

Pivot element is the key element from which we can divide array in such a way that on whatever index we will place that pivot element (let it be i) , all the elements from 0 to i-1 will be less then that pivot element. And all the elements from i+1 to size of that array will be greater then that pivot element
You can make any index pivot element. Usually while making a program, it’s either the middle element or the last element of that array.

hello @TheSourabh

u have reopened the doubt.
pls let me know what issue u r facing now

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.