data structures comp sci y1

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

1/62

encourage image

There's no tags or description

Looks like no tags are added yet.

63 Terms

1
New cards

Elementary data type

Base level - lowest form of data.

2
New cards

Structured data type

Data type made of other data types.

3
New cards

Static data structure

Cannot change size after initialization.

4
New cards

Dynamic data structure

Can change size after initialization.

5
New cards

Array

A static data structure where all elements are the same data type.

6
New cards

Index

Position of an element in a data structure.

7
New cards

Multi-dimensional array

An array within an array.

8
New cards

Element

One value/item in a data structure.

9
New cards

Record

An immutable static data structure of mixed data types (could be a tuple, could be an object).

10
New cards

Tuple

An immutable static data structure of mixed data types.

11
New cards

Immutable

Elements cannot be changed after initialization.

12
New cards

Composite data type

Data type made of other data types.

13
New cards

Abstract data type

Data type that does not physically exist - but is constructed out of other data structures.

14
New cards

Queue

Abstract FIFO static data structure where items are removed from the front and added to the rear.

15
New cards

Circular queue

Abstract FIFO static data structure where dequeued slots are reused (using MOD to change pointer).

16
New cards

Priority queue

Abstract FIFO dynamic data structure where items are enqueued in order of priority.

17
New cards

First In, First Out (FIFO)

Items are removed in order of entry.

18
New cards

Enqueue

Add item to the end of a queue.

19
New cards

Dequeue

Remove and return item from start of queue.

20
New cards

isEmpty

Check if queue is empty (size == 0).

21
New cards

isFull

Check if queue is full (size == maxSize).

22
New cards

List

An abstract dynamic data structure which is mutable and contains mixed data types.

23
New cards

Linked list

A dynamic abstract data structure implemented using nodes (data/pointer pairs).

24
New cards

Append

Adds an item to the end of the list.

25
New cards

Push

Adds an item to the end of the list.

26
New cards

Pop

Remove an item from the end of a list (or by position if passed in).

27
New cards

Stack

Abstract LIFO data structure where items are added to and removed from the top.

28
New cards

Last In, First Out (LIFO)

The last item added is the first item to be removed.

29
New cards

Call stack

System level data structure used for calling functions and managing return addresses and parameters.

30
New cards

Stack frame

Parameters, return addresses and local variables of one function call.

31
New cards

Parameter

Value passed into a function.

32
New cards

Return address

Location in memory where the result of a function is stored.

33
New cards

Heap

Memory allocated for use by dynamic data structures.

34
New cards

Overflow

Attempting to push onto a stack that is full.

35
New cards

Underflow

Attempting to pop from a stack that is empty.

36
New cards

Stack overflow error

When a program tries to add a stack frame onto a full call stack (no memory left available).

37
New cards

Hashing

Creating an address out of a key to be placed in a hash table (typically use mod).

38
New cards

Hash table

Result of a hashing algorithm - abstract data structure where addresses for data are assigned by hashing.

39
New cards

Collision

When a hashing algorithm generates an address for a key that is already in use.

40
New cards

Mid-square method

Square the key, find middle two values and mod by table size.

41
New cards

Folding method

Divide into equal parts, add parts together, mod result by table size.

42
New cards

Dictionary

Data structure made up of key:value pairs.

43
New cards

Graph

Abstract data structure representing complex relationships.

44
New cards

Edge

Line that connects nodes.

45
New cards

Arc

Line that connects nodes.

46
New cards

Vertex

Data within a graph/tree.

47
New cards

Node

Data within a graph/tree.

48
New cards

Directed graph

A graph where the edges point in only one direction.

49
New cards

Digraph

A graph where the edges point in only one direction.

50
New cards

Undirected graph

A graph where the edges are bidirectional (point in both directions).

51
New cards

Weighted edge

An edge which has a value associated with it.

52
New cards

Adjacency matrix

2D list used to represent a graph.

53
New cards

Adjacency list

Dictionary used to represent a graph.

54
New cards

Tree

Abstract data structure which is a graph with no cycles.

55
New cards

Root

Starting node, has no parent nodes.

56
New cards

Child

Has a parent node.

57
New cards

Parent

Has a child node.

58
New cards

Subtree

Subsection of a larger tree.

59
New cards

Leaf node

Node with no further child nodes.

60
New cards

Binary search tree

Tree where each node can only have a maximum of two children.

61
New cards

Pre-order traversal

Root, left subtree, right subtree.

62
New cards

In-order traversal

Left subtree, root, right subtree.

63
New cards

Post-order traversal

Left subtree, right subtree, root.