levo

Recursion, Sorting and Searching

  • 7 subtopics
  • 21 things to know
  • A2 Unit 3

Learn Recursion, Sorting and Searching in runs of four questions, then keep it with spaced repetition.

What Recursion, Sorting and Searching covers

Recursion, Sorting and Searching is examined in A2 Unit 3, Programming and System Development. It covers recursion, quicksort and merge sort, comparing sorting algorithms, big O notation and algorithm complexity, searching and shortest-path algorithms, traversal of data structures and data compression and its efficiency.

Where it is assessed

A2 Unit 3

Programming and System Development.

Check the WJEC specification ↗

The 7 subtopics

Each one has its own page.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Why can a recursive solution fail on a large input where an iterative one succeeds?

Key term

Why does no single sorting algorithm suit every situation?

Key term

How does the A* algorithm differ from Dijkstra's algorithm?

Key term

Describe how a linked list is traversed.

Key term

On what principle does quicksort work?

Key term

What does Big O notation express about an algorithm?

Key term

Define the compression ratio of a compressed file.

Key term

What is a recursive algorithm?

Key term

What is the pivot in quicksort?

Key term

Name four measures used to compare the efficiency of sorting algorithms.

Key term

What is time complexity?

Key term

State the complexity of a binary search and explain why it has that complexity.

Key term

What is meant by traversing a data structure?

Numbers

A 5 MB file is compressed to 2 MB. Calculate the saving percentage.

Key term

What happens when a recursive routine is written without a base case?

Key term

The list 7, 2, 9, 4, 1, 8, 5 is partitioned about the pivot 5. Which values end up on each side of it?

Key term

What effect does a swap flag have on the best-case running time of a bubble sort?

Key term

What is space complexity?

Key term

State the greatest number of comparisons a binary search makes on a sorted list of 1,000,000 items.

Key term

Why can a singly linked list not be traversed backwards?

Key term

A file of 800 KB is compressed to 200 KB. State the compression ratio and the saving percentage.

Take Recursion, Sorting and Searching further

The same content, four other ways.

Questions from this topic

Each one with the model answer underneath.

  1. 1

    What is a recursive algorithm?

    Model answer

    A recursive algorithm is one that solves a problem by calling itself on a smaller version of the same problem.

  2. 2

    Name the two parts every recursive definition must have.

    Model answer

    It must have a base case that is answered without any further call, and a general case that calls the routine again on a smaller problem.

  3. 3

    What happens when a recursive routine is written without a base case?

    Model answer

    The calls never stop, so the stack keeps growing until the memory reserved for it is exhausted and the program crashes.

  4. 4

    Which data structure supports recursion while a program runs, and what is stored on it?

    Model answer

    A stack supports it, holding one frame for each unfinished call containing that call's return address, parameters and local variables.

  5. 5

    Define the factorial function recursively.

    Model answer

    The factorial of 1 is 1, and the factorial of any n greater than 1 is n multiplied by the factorial of n − 1.

  6. 6

    A recursive factorial routine with a base case of 1 is asked for the factorial of 5. How many times is the routine entered, and what value is returned?

    Model answer

    It is entered five times, for 5, 4, 3, 2 and 1, and it returns 120.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

Fetch, , execute.
decodecompilestore

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

A bit is a single binary digit.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Recursion, Sorting and Searching revision questions

What does Recursion, Sorting and Searching cover in WJEC A-Level Computer Science?
7 subtopics: recursion, quicksort and merge sort, comparing sorting algorithms, big o notation and algorithm complexity, searching and shortest-path algorithms, traversal of data structures and data compression and its efficiency. Each one has its own page with questions and model answers.
How is Recursion, Sorting and Searching organised?
By the WJEC 601-5345-3 specification, subtopic by subtopic, so it matches the order you are taught it in.

Every question in Recursion, Sorting and Searching, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.