Data Structures 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 a data structure?

A way to store and organise data so a program can use it easily.

Why use an array or list instead of many variables?

It stores many related items under one name. This makes code shorter and easier to loop through.

What is an element and what is an index in a list or array?

An element is an item stored. Its index is the position number. In many languages the first index is 0.

What is a one-dimensional array?

A single row of items of the same data type. For example, a list of test scores.

What is a two-dimensional array?

A grid with rows and columns, like a table. You access an item with its row and column index.

What is a record?

A structure that groups related fields under one name. The fields can be different data types.

How do you add an item to a list?

Use an add or append operation to put the new item at the end. Or insert it at a given index.

How do you read an item from an array?

Use its index to access it. The item at index 2 is the third item.

How do you update an item in an array or list?

Use its index and assign a new value to that position.

How do you remove an item from a list?

Use a delete or remove operation. You can delete by index or by value. The list closes the gap and shrinks.

What does the length (or size) of an array or list mean?

It is the number of elements stored. Use it to control loops. It helps you avoid going out of range.

What is the main difference between an array and a list?

An array often has a fixed size and one data type. A list can grow and is more flexible.