Decomposition Flashcards

1️⃣ Familiarise yourself with the flashcards:

  • Look through all the flashcards to see what's on both sides.
  • Make sure you understand the information on each card. If something's unclear, click the link to the revision notes at the bottom of the page for more details.

2️⃣ Test yourself:

  • Look at the question or prompt on each card and try to remember the answer before flipping it over.
  • Check the answer and make a note of any cards you find challenging and need to go over more.

3️⃣ Consistently Review and Practice:

  • Use spaced repetition: spend more time on the cards you struggle with and go over them more often.
  • Regularly review all the flashcards to help you better understand and retain the information over time.

Note: We may include questions that have multiple correct answers. It's useful to remember specific examples to understand these concepts better.

PERSONALISED 1-TO-1 TUTORING

Need more help on this topic? Get 1-to-1 support

Get support with clear explanations, practice and feedback (Ages 5 to 16).

  • DBS-checked tutors
  • Flexible times
  • Parents can be updated

Want an ad-free experience? Subscribe to remove ads

What is decomposition in computer science?

Breaking a big problem into smaller, simpler parts.

Why is decomposition useful when designing an algorithm?

It makes hard problems easier to plan, code, test, and fix.

What is a sub-problem?

A smaller task that helps solve the whole problem.

How do you start decomposing a problem?

Write the main goal, list the main tasks, then break each task into smaller steps.

What should you do if a sub-problem is still too big?

Split it again until each part is clear and simple.

How does decomposition help with testing?

You can test each part on its own, so bugs are easier to find and fix.

How does decomposition help code reuse?

Parts that do a common job can be reused in other programs.

Give an example of decomposition for 'make a cup of tea'.

Boil water. Put a tea bag in the mug. Pour water. Wait. Remove the bag. Add milk or sugar if wanted.

In code, how do sub-problems link to functions or procedures?

Each sub-problem can become a function or procedure with clear inputs and outputs.

What is the difference between decomposition and abstraction?

Decomposition splits a problem into parts. Abstraction hides detail to focus on what matters.