You are on page 1of 6

1. **What is the main characteristic of a bitonic sequence in Bitonic Sort?

**

- A. It is strictly increasing.

- B. It is strictly decreasing.

- C. It has both increasing and decreasing phases.

- D. It contains only prime numbers.

2. **In Bitonic Sort, how is a bitonic sequence created during the first phase of the algorithm?**

- A. By randomly shuffling the elements.

- B. By sorting the elements in ascending order.

- C. By sorting the elements in descending order.

- D. By alternating between increasing and decreasing phases.

3. **What is the time complexity of Bitonic Sort?**

- A. O(n log n)

- B. O(n^2)

- C. O(log^2 n)

- D. O(n log^2 n)

4. **Why is Bitonic Sort often used in parallel computing environments?**

- A. It has a lower time complexity than other sorting algorithms.

- B. It can be easily implemented using recursion.

- C. It has a regular structure suitable for parallelization.

- D. It only works with sorted input.


5. **What is the key characteristic of the Bitonic Merge operation in Bitonic Sort?**

- A. Merging two increasing sequences.

- B. Merging two decreasing sequences.

- C. Merging two bitonic sequences.

- D. Merging two randomly ordered sequences.

6. **What is the primary purpose of the Bitonic Sort algorithm?**

- A. To generate random sequences.

- B. To sort sequences that are already bitonic.

- C. To sort sequences that are not necessarily bitonic.

- D. To perform bitwise operations on sequences.

7. **What is the significance of the term "bitonic" in Bitonic Sort?**

- A. It refers to the use of binary representation.

- B. It signifies the alternating pattern of increasing and decreasing phases.

- C. It indicates that only binary numbers can be sorted.

- D. It denotes the use of bitwise XOR operations.

8. **In Bitonic Sort, how many phases are involved in the sorting process?**

- A. One

- B. Two

- C. Three

- D. It depends on the input size.


9. **Which step in Bitonic Sort involves recursively sorting and merging the two halves of a
sequence?**

- A. Bitonic Split

- B. Bitonic Merge

- C. Bitonic Combine

- D. Bitonic Divide

10. **What is the role of a comparator in the Bitonic Merge operation?**

- A. It determines the bitonicity of the sequence.

- B. It decides whether to perform an increasing or decreasing merge.

- C. It compares and swaps elements at specific positions.

- D. It calculates the time complexity of the algorithm.

1. Which of the following sorting algorithms has an average-case time complexity of O(n log n)?

- A. Selection Sort

- B. Bubble Sort

- C. Insertion Sort

- D. Quicksort

2. **What is the worst-case time complexity of Quicksort?**

- A. O(n)

- B. O(n log n)

- C. O(n^2)

- D. O(log n)
3. **Quicksort is an example of which algorithmic paradigm?**

- A. Dynamic Programming

- B. Greedy Algorithm

- C. Divide and Conquer

- D. Backtracking

4. **Which sorting algorithm is known for its efficiency but can have a worst-case time
complexity of O(n^2)?**

- A. Merge Sort

- B. Radix Sort

- C. Quicksort

- D. Shell Sort

5. **In Quicksort, what is the role of the pivot element?**

- A. To always be the largest element in the array

- B. To divide the array into two sub-arrays

- C. To sort the array in ascending order

- D. To be the middle element in the array

1. **What is the fundamental principle behind Merge Sort?**

- A. Selecting a pivot element

- B. Breaking down a list into sub-lists and merging them

- C. Repeatedly swapping adjacent elements

- D. Sorting elements by comparing adjacent pairs

2. **In Merge Sort, how are sub-lists created during the divide step?**

- A. By selecting random elements

- B. By splitting the list into smaller sub-arrays

- C. By choosing the largest element as the pivot

- D. By swapping adjacent elements until the list is sorted


3. **What do the variables 'i' and 'j' represent in the context of Merge Sort?**

- A. Pivot elements for Quicksort

- B. Indices used to merge two sorted lists

- C. Variables used for recursion in Merge Sort

- D. Counters for the number of iterations

4. **How does Quicksort work during the "Divide" step?**

- A. By randomly rearranging elements

- B. By selecting the largest element as the pivot

- C. By splitting the input into two sub-arrays

- D. By swapping adjacent elements until the array is sorted

5. **What are the three main steps of the Quicksort algorithm?**

- A. Divide, Merge, Combine

- B. Select, Sort, Recombine

- C. Pick, Divide, Repeat and Combine

- D. Split, Move, Repeat and Merge

6. **In Merge Sort, how is the merging of two sorted lists done?**

- A. By swapping elements between the lists

- B. By comparing and moving elements from both lists

- C. By randomly combining elements

- D. By selecting the largest element as the pivot

7. **What is the worst-case time complexity of Merge Sort?**

- A. O(n)

- B. O(n log n)

- C. O(n^2)

- D. O(log n)
8. **Which sorting algorithm explicitly follows the steps: Pick, Divide, Repeat and Combine?**

- A. Quick Sort

- B. Bubble Sort

- C. Insertion Sort

- D. Radix Sort

9. **What is the main advantage of Quicksort over some other sorting algorithms?**

- A. It always has a linear time complexity

- B. It does not require additional memory space

- C. It has better average-case time complexity

- D. It is stable and preserves the relative order of equal elements

10. **During the "Pick" step in Quicksort, what is the element selected as?**

- A. The smallest element in the array

- B. The median element in the array

- C. The pivot element

- D. The largest element in the array

--------------------------------------------------------------------------------------------------------------------------------

You might also like