Community

Community resources

Computer science Worksheets and Python Workspaces shared by Coding Pathway teachers. Worksheets cover exam board theory as well as programming. Read any of them in full here. Teachers can copy one into their own lessons and edit it before setting it to a class.

Planning a whole course or unit? Our mapped pages put the teaching sequence in order with the Worksheets that cover it: OCR GCSE Computer Science (J277), Pearson Edexcel GCSE Computer Science (1CP2), OCR A Level Computer Science (H446), Python Turtle for Key Stage 3.

  • 438 resources
  • 3 teachers sharing
  • Creative Commons licensed

Searching and sorting

5 resources match. Newest first. Opening a resource shows the whole thing, with answers and marking held back.

WorksheetSeries · 5 parts

H446 2.3.1 · Algorithms

Includes OCR H446 2.3.1 Best, average and worst cases

Input size is not the whole story: arrangement and target position change the work done, which is the distinction H446 2.3.1 draws between best, average and worst cases. The worksheet insists that every case claim carries its assumptions, and keeps cases apart from the growth classes students meet alongside them. Students will: - define best, average and worst by describing the input condition that produces each - identify the arrangements that give insertion sort its least and most shifting work - state the algorithm version, size, arrangement and counted operation behind any claim - critique a statement that mixes a case up with a complexity class - construct concrete inputs for a stopping condition and draw growth conclusions from them Inside: 6 explanation cells, 1 multiple-choice question, 1 fill-in-the-blanks cell and 3 written answers. 21 marks, about 20 to 30 minutes. Series: H446 2.3.1 · Algorithms, part 4 of 16.

By Coding Pathway · 11 cells · 30 min · CC BY-SA 4.0 · Shared 31 Aug 2026

A LevelOCRAlgorithmsSearching and sorting
Worksheet

OCR H446 1.4.2 Binary search trees: operations

Part 10 · H446 1.4.2 · Data structures

The binary search tree in H446 1.4.2 is where ordering becomes an operation: each comparison discards a whole subtree. This worksheet works through search, insertion, the three deletion cases and the depth-first traversal orders, and closes on why the shape of the tree, not just its contents, decides how well search performs. Students will: - apply the ordering invariant across a whole subtree rather than to one parent comparison - search for and insert values by repeated comparison, giving the comparison path taken - handle removal of leaf, one-child and two-child nodes consistently - give pre-order, in-order and post-order traversals and say which produces sorted output - explain how already sorted input can leave a tree behaving much like a linked list Inside: 10 explanation cells, 1 multiple-choice question, 1 fill-in-the-blanks cell, 3 written answers and 2 Python tasks. 33 marks, about 50 to 60 minutes. Series: H446 1.4.2 · Data structures, part 10 of 14.

By Coding Pathway · 17 cells · 60 min · CC BY-SA 4.0 · Shared 31 Aug 2026

A LevelOCRData structuresSearching and sorting
WorksheetSeries · 3 parts

1CP2-CT-5 · Merge sort, files and authentication

Includes 1CP2-CT-5.1 How merge sort works

The opening merge sort worksheet, following the divide and merge stages by hand before any code is written. Students will: - describe the divide stage and the merge stage separately - show the output after each comparison of a complete merge - explain why a merge only compares the two first unused values - identify the mistake behind a merge that concatenates instead - state one memory cost and one benefit of merge sort Inside: 6 explanation cells, 3 multiple-choice questions, 1 fill-in-the-blanks cell and 4 written answers. 17 marks, about 45 minutes. Series: 1CP2-CT-5 · Merge sort, files and authentication, part 1 of 7.

By Coding Pathway · 14 cells · 45 min · CC BY-SA 4.0 · Shared 17 Aug 2026

GCSEEdexcelSearching and sortingScaffolded support
WorksheetSeries · 3 parts

1CP2-CT-4 · Structures, validation and search

Includes 1CP2-CT-4.5 Linear search in one dimension

The search worksheet, maintaining the three pieces of state a linear search needs and stopping correctly. Students will: - count the comparisons a search makes - trace a linear search to its termination - explain why both loop conditions are needed - write a complete search of their own - preserve a correct not-found outcome Inside: 6 explanation cells, 2 multiple-choice questions, 1 Python task, 1 trace table, 1 fill-in-the-blanks cell and 2 written answers. 14 marks, about 45 minutes. Series: 1CP2-CT-4 · Structures, validation and search, part 5 of 7.

By Coding Pathway · 13 cells · 45 min · CC BY-SA 4.0 · Shared 17 Aug 2026

GCSEEdexcelTrace tablesSearching and sorting
WorksheetSeries · 4 parts

J277 2.1.3 · Searching and sorting

Includes J277 2.1.3 Linear and binary searching

The two search algorithms in OCR J277, understood and applied rather than memorised as code. Students will: - describe the steps of a linear search - describe the steps of a binary search - state the prerequisite binary search depends on - apply both algorithms to given data - recognise each algorithm from code Inside: 5 explanation cells, 2 runnable Python tasks, 3 multiple-choice questions and 3 written answers. 16 marks, about 45 minutes. Series: J277 2.1.3 · Searching and sorting, part 1 of 4.

By Coding Pathway · 13 cells · 45 min · CC BY-SA 4.0 · Shared 17 Aug 2026

GCSEOCRAlgorithmsSearching and sorting