The process of rearranging the elements of an array such that all the elements less than the pivot are on its left and all the elements greater than the pivot are on its right is called _______.

  • Indexing
  • Partitioning
  • Shuffling
  • Sorting
The process described is called partitioning. It is a fundamental step in various sorting algorithms like QuickSort, where a pivot is chosen, and elements are rearranged based on their relation to the pivot.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *