MAKE IT YOURS

A world for every learner

Choose a grade to discover its colours and creative world.

Grade 9 Searching & Sorting Worksheet with Answers

Grade 9 (US) · Year 10 (UK) · Class 9 (India) · Computer Science

Unit 3: AlgorithmsSearching & Sorting

Counting the steps in linear and binary search and tracing bubble and selection sort passes. This free high school worksheet has 12 questions and a full answer key. Print it or save it as a PDF — every answer is checked by code, not guessed.

  • Answer keys checked by code
  • No ads, ever
  • No student accounts needed
  • Safety & privacy
Practice Sheetaethelsystems.com

Searching & Sorting

Grade 9 · Computer Science

Score___ / 12

Name

Class

Date

Learning goal: Searching & Sorting

Directions: Read each question carefully and write your answer on the line. Use the diagram to help you.

Example

What is the most number of checks binary search needs to find an item in a sorted list of 1,000 items?

Answer: 10

RememberSearch & sort

Linear searchcheck one by oneup to n checksBinary searchsorted list: check middle,throw away halfBubble sortswap neighbours thatare in the wrong orderSelection sortfind the smallest,swap it to the front
  1. 1

    Bubble sort (smallest to largest). Write the list after the first full pass: 32, 19, 41, 8, 24, 28

    32019141283244285index
  2. 2

    Binary search on the sorted list 2, 13, 14, 17, 18, 30, 33, 35, 41. Which number is checked first (the middle item)?

    20131142173184305336357418index
  3. 3

    Binary search on the sorted list 3, 15, 19, 24, 25, 28, 31, 37, 40. Which number is checked first (the middle item)?

    30151192243254285316377408index
  4. 4

    Bubble sort (smallest to largest). Write the list after the first full pass: 16, 18, 34, 14, 30, 21

    160181342143304215index
  5. 5

    Linear search checks items one by one from the left. List: 20, 28, 18, 12, 10, 17, 3, 13, 24. How many items are checked to find 18?

    20028118212310417536137248index
  6. 6

    Binary search on the sorted list 4, 9, 16, 22, 26, 30, 31, 33, 35. Which number is checked first (the middle item)?

    4091162223264305316337358index
  7. 7

    Bubble sort (smallest to largest). Write the list after the first full pass: 41, 7, 24, 19, 5, 38

    4107124219354385index
  8. 8

    Linear search checks items one by one from the left. List: 10, 24, 14, 40, 32, 31, 23, 41, 30. How many items are checked to find 31?

    100241142403324315236417308index
  9. 9

    Bubble sort (smallest to largest). Write the list after the first full pass: 27, 35, 36, 29, 6, 23

    27035136229364235index
  10. 10

    Bubble sort (smallest to largest). Write the list after the first full pass: 16, 10, 36, 27, 37, 4

    16010136227337445index
  11. 11

    Bubble sort (smallest to largest). Write the list after the first full pass: 17, 28, 5, 38, 12, 11

    17028152383124115index
  12. 12

    Bubble sort (smallest to largest). Write the list after the first full pass: 33, 27, 24, 16, 28, 21

    330271242163284215index

★ Challenge corner for fast finishers

5 computers each connect directly to every other computer with one cable. How many cables are needed?

How did I do?

Teacher's comments

Free printable worksheets with answer keys · aethelsystems.com/worksheets/computer/9/search_sort

Answer key (click to show)
  1. 1.19, 32, 8, 24, 28, 41
  2. 2.18
  3. 3.25
  4. 4.16, 18, 14, 30, 21, 34
  5. 5.3
  6. 6.26
  7. 7.7, 24, 19, 5, 38, 41
  8. 8.6
  9. 9.27, 35, 29, 6, 23, 36
  10. 10.10, 16, 27, 36, 4, 37
  11. 11.17, 5, 28, 12, 11, 38
  12. 12.27, 24, 16, 28, 21, 33
  13. ★10 (challenge corner)

Need another Searching & Sorting worksheet?

Generate unlimited fresh versions at easy, medium or hard difficulty, each with its own answer key. Free during our launch — no card needed.

Create a free account

How to use this worksheet

  • Use it for revision before a test, as homework, or as a timed practice set.
  • Students can self-mark with the answer key and note which question types they got wrong.
  • Generate several versions of the same topic for spaced practice in the weeks before an exam.

Can't find what you need? Tell us which worksheet to make next.

Frequently asked questions

Does this Grade 9 Searching & Sorting worksheet come with answers?

Yes. The full answer key is on this page, and it prints on its own page after the questions. Every answer is calculated or checked by code rather than written by an AI model, so the key is always correct.

How do I print it or save it as a PDF?

Click "Download PDF" to save a ready-to-print PDF with the answer key on the last page, or click "Print" to send the worksheet and answer key straight to your printer.

Can I get a different Searching & Sorting worksheet?

Yes. Create a free account to generate as many fresh Grade 9 Searching & Sorting worksheets as you like, at easy, medium or hard difficulty, each with its own answer key.

Is this worksheet free?

Yes. This worksheet is free to print, and Practice Sheet is free to use during our launch with no card needed.