levo

Algorithms

Efficiency of algorithms

  • 3 things to know
  • Paper 1

Overview

What efficiency means, why steps are counted rather than timed, how growing data changes the picture, two ways to sum 1 to 100 or test 101 for prime, and memory as a second measure.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Can more than one algorithm solve the same problem?

Key term

What is meant by the efficiency of an algorithm?

Key term

What is time efficiency?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    Can more than one algorithm solve the same problem?

    Model answer

    Many different algorithms can solve the same problem. A list can be sorted by a bubble sort, a merge sort or several other methods.

  2. 2

    What is meant by the efficiency of an algorithm?

    Model answer

    Efficiency is how much time or memory an algorithm needs to complete its task. A more efficient algorithm solves the same problem with fewer resources.

  3. 3

    What is time efficiency?

    Model answer

    Time efficiency is how quickly an algorithm completes its task. Time efficiency is judged by how many steps the algorithm carries out.

  4. 4

    Why are algorithms compared by counting steps rather than timing them with a stopwatch?

    Model answer

    The time a program takes depends on the computer that runs it. The number of steps depends only on the algorithm, so it gives a fair comparison.

  5. 5

    Why does efficiency matter more as the amount of data grows?

    Model answer

    A small difference in steps per item becomes a huge difference over millions of items. An inefficient algorithm can become too slow to use on large data sets.

  6. 6

    Two algorithms find the sum of the whole numbers from 1 to 100. One adds them in a loop and one calculates 100 × 101 ÷ 2. Which is more time efficient?

    Model answer

    The formula is more time efficient, because it takes the same few steps for any size of problem. The loop needs 100 additions, and more as the numbers grow. Each method gives 5,050.

Other ways to work this

The same content, four other ways.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Algorithms
Programming
Data Representation
Computer Systems

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

The table one extra row.
gainslosescopies

Blank Blitz makes facts automatic

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

AThe algorithm outputs 1.
BThe variable x falls from 5 to 3 to 1.
CThe loop stops because 1 is not greater than 1.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

ASC means sorting from smallest to largest, or A to Z.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

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

Every question in Algorithms, on a schedule.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

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