The following are the objective questions on the topic related to Sorting in data structures using C/C++.
1. Which of the following is not a non comparison sort?
- Counting sort
- Bucket sort
- Radix sort
- Shell sort
2. The time complexity of heap sort in worst case is___
3.In a binary max heap containing n numbers, the smallest element can be found in time_.
- θ (n)
- θ (logn)
- θ (loglogn)
- θ (1)
4.The running time for creating a heap of size n is
- O (n)
- O (log n)
- O (n log n)
- O (n2)
5.Finding the location of a given item in a collection of items is called ……
6.Which of the following is an external sorting?
- Insertion Sort
- Bubble Sort
- Merge Sort
- Tree Sort
7.The function used to modify the way of sorting the keys of records is called ……..
- Indexing function
- Hash function
- Addressing function
- All of the above
8.The complexity of bubble sort algorithm is …..
- O(n logn)
9.Bubble sort sometimes referred to as _____________.
- binding sort.
- sinking sort.
- skip sort.
- none of these.
10.The worst complexity of bubble sort is ________.
11.The bubble sort algorithm compares each pair of adjacent___________ and swaps them if they are in wrong order.
12.The best complexity of bubble sort is _____