
5_Arrays — Bubble Sort
Authored by Pratima SEEWOONAUTH
Computers
10th - 11th Grade
Used 24+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
5 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following statements is true about Bubble sort?
It works in a random order, swapping elements haphazardly.
It works by repeatedly swapping the adjacent elements if they are in the wrong order.
It compares adjacent elements to check whether they are in the wrong order.
It involves a repetitive iteration.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bubble sort involves the use of a ________ "for" loop.
random
sequential
nested
serial
3.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following statements is true about Bubble sorting an array?
It requires several passes to reorder elements of an array.
It is the only method used for sorting arrays.
It involves comparison and swapping of elements.
Elements must be swapped regardless of order.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following piece of code (assume that the code is indented properly):
num = arr.array('i', [12, 3, 2, 6, 1])
for i in range(len(num)):
for j in range(0, len(num)-i-1):
if num[j] > num[j+1] :
num[j], num[j+1] = num[j+1], num[j]
12, 3, 2, 6, 1
12, 6, 3, 2, 1
1, 2, 3, 6, 12
returns an error
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
The given array is num = arr.array('i', [1, 2, 4, 3]). Bubble sort is used to sort the array elements. How many iterations will be done to sort the array with improvised version?
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
9 questions
OCR GCSE CS - 2.1 ERL sorts and searches
Quiz
•
10th - 11th Grade
10 questions
Data communication
Quiz
•
9th - 11th Grade
10 questions
UNKNOWN TRICKS AND TIME SAVERS
Quiz
•
11th Grade
10 questions
DNS dan Web server
Quiz
•
11th Grade
10 questions
ADV CSS Ex3
Quiz
•
9th - 12th Grade
10 questions
GRADE 11 & 12 ICT
Quiz
•
9th - 12th Grade
10 questions
Web Design: Pop Quiz
Quiz
•
10th - 12th Grade
10 questions
Arrays
Quiz
•
11th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade