RxSLR14 - Data Structures

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/15

flashcard set

Earn XP

Description and Tags

OCR A-Level Computer Science (H446)

Last updated 10:21 PM on 7/5/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

16 Terms

1
New cards

What are linked lists composed of?

Nodes and pointers

2
New cards

What does the start pointer identify? What do the pointers point to?

  • The first node

  • The next node

3
New cards

How can linked lists be implemented?

By using arrays or objects

4
New cards
5
New cards

What are the steps for adding an item to a linked list?

  • Checks if there is free memory for a node, else output error

  • Updates free pointer to the next available storage space

6
New cards

What are the steps for deleting an item to a linked list?

  • Checks if list is empty, outputs error if so

7
New cards

What is a tuple?

  • An ordered set of values of any type

  • Immutable (values CANNOT be changed)

  • Regular brackets

8
New cards

What are records?

  • A structure with a collection of related fields

  • Each field is a variable and can have different data types

9
New cards

What is a graph?

  • Dynamic, non-linear data structure

  • Consists of nodes and pointers

  • Each node can have any number of pointers

  • Directed, undirected, weighted

  • Searched using Depth-first or Breadth-first search

10
New cards

What is a tree?

  • Type of graph

  • Each tree has a root node, child nodes, and leaf nodes at bottom

  • 1-direction

  • Doesn’t cycle

  • Not weighted

11
New cards

What are binary trees?

  • Special case of graph

  • Each node can only have 0, 1, or 2 pointers

  • Can be stored as an array

12
New cards

What are stacks?

  • Data structure using LIFO

  • Items push() and pop().

  • Can peek() without removing data

  • Single stack pointer (top)

13
New cards

What are queues?

  • Data structure using FIFO

  • Items enqueue() and dequeue()

  • Can peek() at item at front of queue

  • Two pointers (front & back)

14
New cards

What happens when you add an item to a stack?

  • push() operation

  • Checks if stack is full, outputs error if so

  • If not full, increment stack pointer

  • Insert new item at location of stack pointer

15
New cards

What happens when you remove an item from a stack?

  • pop() operation

  • Checks if stack is empty, outputs error if so

  • If not empty, item at stack pointer deleted

  • Stack pointer decrements

16
New cards

What happens when you add an item to a queue?

  • enqueue() operation

  • Check if queue is full, output error if so

  • If not full, increment