Bubble Sort
After the first pass in a bubble sort algorithm, which of the following is true?
Bubble Sort, Insertion and Merge Sort Quiz
Quiz
•
Computers
•
12th Grade
•
Hard
Terry Watts
Used 5+ times
FREE Resource
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bubble Sort
After the first pass in a bubble sort algorithm, which of the following is true?
The smallest element is in its correct position.
The largest element is in its correct position.
All elements are sorted.
No elements are in their correct position.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bubble Sort
How many loops do we need for bubble sort algorithm?
1 while loop
1 for loop
1 while loop with a nested for loop
Any two separate loops
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bubble Sort
What operation is performed using for loop in bubble sort algorithm?
Elements are compared with its next element.
Checks swap flag
Elements are compared with its next element and swapped if necessary
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bubble Sort
In which of the following cases, are the numbers swapped in bubble sort?
The current element is greater than the next element
The current element is less than the next element
The current element is equal to the next element
None of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bubble Sort
Based on the list: 9, 5, 3, 6, 11
How many swapping is performed in the first loop?
2
3
4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bubble Sort
Based on the list: 9, 5, 3, 6, 11
How many swapping is performed in the second loop?
1
2
3
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bubble Sort
Based on the list: 9, 5, 3, 6, 11
What is the total number of passes required?
1
2
3
18 questions
Sorting Algorithms
Quiz
•
11th - 12th Grade
20 questions
iGCSE Computer Science: Problem Solving
Quiz
•
9th - 12th Grade
20 questions
Searching and Sorting
Quiz
•
10th - 12th Grade
20 questions
Principles of Computer Science
Quiz
•
10th - 12th Grade
13 questions
Algorithms Quiz
Quiz
•
12th Grade
20 questions
Week 6 - ECS
Quiz
•
12th Grade
18 questions
Binary and Linear Search
Quiz
•
9th - 12th Grade
15 questions
Paper 2 Revision
Quiz
•
10th Grade - University
15 questions
Multiplication Facts
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
5 questions
capitalization in sentences
Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions
Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines
Quiz
•
Professional Development
12 questions
Dividing Fractions
Quiz
•
6th Grade