bubble sort worksheet, Exams of Computer science

worksheet on bubble sort computer science

Typology: Exams

2025/2026

Uploaded on 06/15/2026

abdu-14
abdu-14 🇬🇧

2 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Name: Abdurahman............................................................................... Class: 10C...............
Task 1 Bubble sort
Your teacher will give you a set of name cards.
Place the cards in the sequence of numbers 1, 2, 3… 10
Perform a manual Bubble Sort to get the cards in alphabetical order.
1. What are the last two names after the first pass?
Boys set of cards: Charlie, Oscar
Girls set of cards:
2. What are the first two names after the second pass?
Boys set of cards: George, Harry
Girls set of cards:
3. What are the third and fourth names after the third pass?
Boys set of cards: Jack, Arthur
Girls set of cards:
4. What are the seventh and eighth names after the fourth pass?
Boys set of cards: Muhammad, Noah
Girls set of cards:
5. What are the fourth and fifth names after the fifth pass?
Boys set of cards: Jack, Charlie
Girls set of cards:
pf3

Partial preview of the text

Download bubble sort worksheet and more Exams Computer science in PDF only on Docsity!

Name: Abdurahman ............................................................................... Class: 10C ...............

Task 1 Bubble sort

Your teacher will give you a set of name cards. Place the cards in the sequence of numbers 1, 2, 3… 10 Perform a manual Bubble Sort to get the cards in alphabetical order.

  1. What are the last two names after the first pass? Boys set of cards: Charlie, Oscar Girls set of cards:
  2. What are the first two names after the second pass? Boys set of cards: George, Harry Girls set of cards:
  3. What are the third and fourth names after the third pass? Boys set of cards: Jack, Arthur Girls set of cards:
  4. What are the seventh and eighth names after the fourth pass? Boys set of cards: Muhammad, Noah Girls set of cards:
  5. What are the fourth and fifth names after the fifth pass? Boys set of cards: Jack, Charlie Girls set of cards:
  1. What are the first two names after the sixth pass? Boys set of cards: Arthur, George Girls set of cards:
  2. Which names are out of sequence after the seventh pass? Boys set of cards: George, Charlie Girls set of cards:
  3. Are any names out of sequence after the eighth pass? Boys set of cards: No Girls set of cards:
  4. How many passes were needed to sort the cards? Boys set of cards: 8 passes. Girls set of cards: 10.Complete the table below to show the state of the list after each swap when sorting using the bubble sort algorithm. (4)

Original

List

Swap 1 34 21 48 54

Swap 2 21 34 48 54

Swap 3

Swap 4

11.Complete the table below to show the state of the list after each swap when sorting using the bubble sort algorithm. (4)

Original

List

Banana Kiwi Pear Apple

Orange

Swap 1 Banana Kiwi Apple Orange Pear

Swap 2 Banana Apple Kiwi Orange Pear

Swap 3 Apple Baanan Kiwi Orange Pear

Swap 4