MAKE IT YOURS

A world for every learner

Choose a grade to discover its colours and creative world.

Grade 8 Searching & Sorting Worksheet with Answers

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

Unit 3: AlgorithmsSearching & SortingCSTA 2-AP-10

Counting the steps in linear and binary search and tracing bubble and selection sort passes. This free middle 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 8 · Computer Science

Score___ / 12

Name

Class

Date

Learning goal: Searching & Sorting · CSTA 2-AP-10

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

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

    Binary search on the sorted list 7, 8, 13, 20, 23, 24, 27, 34, 35. Which number is checked first (the middle item)?

    7081132203234245276347358index
  2. 2

    Binary search on the sorted list 6, 11, 12, 15, 16, 21, 26, 27, 35. Which number is checked first (the middle item)?

    60111122153164215266277358index
  3. 3

    Bubble sort (smallest to largest). Write the list after the first full pass: 38, 15, 37, 14, 11, 30

    380151372143114305index
  4. 4

    Binary search on the sorted list 7, 9, 14, 18, 19, 21, 26, 32, 40. Which number is checked first (the middle item)?

    7091142183194215266327408index
  5. 5

    Binary search on the sorted list 12, 16, 18, 22, 23, 25, 26, 33, 40. Which number is checked first (the middle item)?

    120161182223234255266337408index
  6. 6

    Linear search checks items one by one from the left. List: 12, 35, 41, 10, 14, 6, 2, 22, 8. How many items are checked to find 14?

    120351412103144652622788index
  7. 7

    Binary search on the sorted list 4, 12, 15, 16, 22, 24, 33, 35, 41. Which number is checked first (the middle item)?

    40121152163224245336357418index
  8. 8

    Linear search checks items one by one from the left. List: 17, 13, 5, 27, 4, 32, 40, 33, 19. How many items are checked to find 27?

    1701315227344325406337198index
  9. 9

    Binary search on the sorted list 9, 16, 23, 24, 26, 27, 28, 35, 36. Which number is checked first (the middle item)?

    90161232243264275286357368index
  10. 10

    Bubble sort (smallest to largest). Write the list after the first full pass: 29, 23, 13, 10, 38, 19

    290231132103384195index
  11. 11

    Bubble sort (smallest to largest). Write the list after the first full pass: 36, 11, 4, 28, 15, 19

    36011142283154195index
  12. 12

    Binary search on the sorted list 6, 9, 21, 24, 27, 33, 35, 38, 41. Which number is checked first (the middle item)?

    6091212243274335356387418index

★ Challenge corner for fast finishers

How many different patterns can 7 bits make?

6432168421

How did I do?

Teacher's comments

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

Answer key (click to show)
  1. 1.23
  2. 2.16
  3. 3.15, 37, 14, 11, 30, 38
  4. 4.19
  5. 5.23
  6. 6.5
  7. 7.22
  8. 8.4
  9. 9.26
  10. 10.23, 13, 10, 29, 19, 38
  11. 11.11, 4, 28, 15, 19, 36
  12. 12.27
  13. ★128 (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

  • Works well as a bell-ringer, exit ticket, homework set or quick quiz.
  • Have students self-check with the answer key, then correct their own mistakes before you review.
  • Generate a new version of the same topic for a re-test, so students can't just memorise the answers.

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

Frequently asked questions

Does this Grade 8 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 8 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.