0% found this document useful (0 votes)
31 views4 pages

Bubble Sort Quiz

The document is a quiz on the Bubble Sort algorithm, consisting of multiple tests including fill-in-the-blanks, true or false statements, and sequence identification. It covers key concepts such as time complexity, space complexity, and the steps involved in the Bubble Sort process. The quiz is designed for participants to demonstrate their understanding of the algorithm's mechanics and characteristics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views4 pages

Bubble Sort Quiz

The document is a quiz on the Bubble Sort algorithm, consisting of multiple tests including fill-in-the-blanks, true or false statements, and sequence identification. It covers key concepts such as time complexity, space complexity, and the steps involved in the Bubble Sort process. The quiz is designed for participants to demonstrate their understanding of the algorithm's mechanics and characteristics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Quiz: Bubble Sort

Submitted by: Unson, Carl Joshua


Jimenez, Ashley
Rafael, Ibe

Test A: Fill in the blanks


1-2. Bubble sort is the simplest sorting algorithm that works by repeatedly swapping the
adjacent element if they are in wrong order.
A. repeatedly, adjacent
B. adjacent, repeatedly
C. consecutively, congruent
D. congruent, consecutively

3-4. This algorithm is not suitable for large data sets as its average and worst-case time
complexity are quite high.
A. small, best
B. medium-sized, worse
C. large, worst
D. large, worse

5-6. The time complexity of bubble sort is O(n ²) in the worst-case scenario and the space
complexity of the bubble sort is O(1).
A. O(n ²) and O(1).
B. O(1) and O(n ²)
C. o(n ²) and O(n ²)
D. O(n ²) and o(n ²)

7-8. Bubble sort only needs a constant amount of additional space during the sorting process.
A. changing, before
B. constant, after
C. constant, during
D. small, during

9-10. Bubble Sort is easy to understand and implement.


A. understand, implement
B. do, implement
C. do, complement
D. understand, compliment

Test B: Modified True or False. If the statement is false, choose the letter of the correct
answer.

11. Linear Sort does not require any additional memory space. False, Linear - Bubble
A. True
B. False, Linear – Bubble
C. False, Linear – Merge

12. It is an unstable sorting algorithm, meaning that elements with the same key value maintain
their relative order in the sorted output. False, unstable - stable
A. True
B. False, unstable – constant
C. False, unstable – stable

13. Bubble sort has a time complexity of O (n ²) which makes it very fast for large data sets.
False, fast - slow
A. True
B. False, fast – slow
C. False, fast – accurate
14-15. Bubble sorting is comparison-based sorting complexity, which means that it requires a
comparison operator to determine the relative order of elements in the input data set. It can limit
the effectivity of the algorithm in certain cases. False, complexity – algorithm & effectivity –
efficiency
A. True
B. False, complexity – algorithm & effectivity – efficiency
C. False, complexity – efficient & effectivity – complexity

Test C. Bubble Sort Sequence

16. Which of the following is the third step in bubble sorting?


A. Evaluate pairs of adjacent elements, comparing each with the next. When a pair is out
of order, swap them.
B. After completing a pass, the largest unsorted element will have moved to its correct
position. Reduce the range of elements that need to be checked in the next iteration.
C. Continue checking and swapping adjacent elements until no further swaps are needed,
indicating that the list is fully sorted.

17. Which of the following is the first step in bubble sorting?


A. Evaluate pairs of adjacent elements, comparing each with the next. When a pair is out
of order, swap them.
B. After completing a pass, the largest unsorted element will have moved to its correct
position. Reduce the range of elements that need to be checked in the next iteration.
C. Continue checking and swapping adjacent elements until no further swaps are needed,
indicating that the list is fully sorted.

18. Which of the following is the second step in bubble sorting?


A. Evaluate pairs of adjacent elements, comparing each with the next. When a pair is out
of order, swap them.
B. After completing a pass, the largest unsorted element will have moved to its correct
position. Reduce the range of elements that need to be checked in the next iteration.
C. Continue checking and swapping adjacent elements until no further swaps are needed,
indicating that the list is fully sorted.
19-20. Which is the correct sequence in Bubble Sorting?
I. Evaluate pairs of adjacent elements, comparing each with the next. When a pair is out
of order, swap them.
II. After completing a pass, the largest unsorted element will have moved to its correct
position. Reduce the range of elements that need to be checked in the next iteration.
III. Continue checking and swapping adjacent elements until no further swaps are needed,
indicating that the list is fully sorted.

A. III – I – II
B. I – II – III
C. II – III – I

You might also like