Which operation arranges data elements according to a specified order?

Options

  • A. Sorting
  • B. Deletion
  • C. Traversal
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. Sorting

Detailed Explanation

Sorting arranges data elements according to a specified order, such as ascending or descending order. Common sorting algorithms include Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, and Quick Sort. Their time and space complexities differ. For example, Merge Sort generally runs in O(n log n) time, while Bubble Sort has O(n²) worst-case time. Sorting can make subsequent operations such as searching more efficient, especially when algorithms like Binary Search require ordered data.