H446 Section 7 Data Structures

5.0(1)
studied byStudied by 11 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/74

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

75 Terms

1
New cards

Array

A collection of elements identified by index or key, stored in contiguous memory locations. Arrays allow for efficient data organization and access.

2
New cards

Tuple

An ordered collection of elements, typically of different types, that can be indexed but are immutable.

3
New cards

Record

A collection of fields, typically of different data types, that are grouped together to represent a single entity or object. Records are often used in databases to store related information.

4
New cards

String

A sequence of characters used to represent text data, often enclosed in quotes. Strings are commonly used in programming for manipulating and displaying textual information.

5
New cards

Finite

A set with a limited number of elements, often used in the context of data structures to describe collections that are not infinite.

6
New cards

Ordered

A sequence that has a specific arrangement or arrangement of elements, where the position of each element is significant.

7
New cards

Index

A position or location within a data structure, such as an array or list, used to access or manipulate elements based on their order.

8
New cards

1-D Array

A linear data structure consisting of a collection of elements, each identified by at least one array index or key, allowing for efficient storage and retrieval.

9
New cards

2-D Array

A data structure consisting of a collection of elements arranged in rows and columns, where each element can be accessed using two indices.

10
New cards

Immutable

A data structure that cannot be modified after it is created, meaning its elements cannot be changed, added, or removed.

11
New cards

field

A specific area in a data structure that holds a single piece of data or value, often part of a record or entity.

12
New cards

file

A collection of records or data stored in a structured format on a storage device, which can be accessed and managed by software.

13
New cards

Queue

A linear data structure that follows the First In First Out (FIFO) principle, where elements are added at the rear and removed from the front.

14
New cards

Abstract Data Type

A data type defined purely by its behaviour from the point of view of a user, specifying the operations that can be performed on it without revealing its implementation details e.g. a queue, stack, tree or graph, allowing for abstraction and encapsulation.

15
New cards

FIFO

A method of processing data where the first element added is the first one to be removed, commonly used in queues.

16
New cards

enQueue

The operation of adding an element to the rear of a queue.

17
New cards

deQueue

The operation of removing an element from the front of a queue.

18
New cards

isEmpty

A function that checks whether a queue has no elements, returning true if it is empty and false otherwise.

19
New cards

isFull

A function that checks whether a queue has reached its maximum capacity, returning true if it is full and false otherwise.

20
New cards

Dymanic data structure

A data structure that can grow and shrink in size during program execution, allowing for efficient memory usage.

21
New cards

Static data structure

A data structure that has a fixed size, determined at compile time, and cannot change in size during program execution.

22
New cards

Heap

A portion of memory from which space is automatically allocated or de-allocated as needed.

23
New cards

Overflow

A condition that occurs when more data is written to a data structure than it can hold, leading to data loss or corruption.

24
New cards

Circular queue

A linear data structure that follows the FIFO principle but connects the end of the queue back to the front, allowing for efficient use of space.

25
New cards

Priority Queue

A special type of queue that allows elements to be added based on priority rather than just the order they were added. In a priority queue, elements with higher priority are served before those with lower priority.

26
New cards

List

A collection of ordered elements that can be accessed by their index. Lists can be mutable or immutable, allowing for various operations such as insertion, deletion, and traversal.

27
New cards

Append

To add an element to the end of a list or collection, increasing its size.

28
New cards

Pop

To remove and return the last element from a list or collection, typically reducing its size.

29
New cards

Index

The position of an element within a list, used to access or modify the element directly.

30
New cards

Length

The number of elements in a list or collection, indicating its size.

31
New cards

Remove

To delete an element from a list or collection, which may shift subsequent elements.

32
New cards

Linked list

A linear data structure consisting of nodes, where each node contains data and a reference to the next node in the sequence.

33
New cards

Node

An individual component of a linked list containing data and a reference (or pointer) to the next node in the sequence.

34
New cards

Data Field

A component of a node that holds the actual data value. It can vary in type and size depending on the data structure design.

35
New cards

Link

A reference or pointer in a data structure that connects one node to the next in a sequence, allowing traversal through the linked list.

36
New cards

Null pointer

A special type of pointer that does not reference any valid object or node in a data structure, often used to signify the end of a linked list.

37
New cards

Initialisation

The process of preparing a data structure for use by assigning initial values to its fields or allocating memory for its nodes.

38
New cards

Stack

A data structure that follows the Last In First Out (LIFO) principle, where elements are added and removed from the top.

39
New cards

LIFO

An acronym for "Last In, First Out," describing a type of data structure where the last element added is the first one to be removed, commonly used in stacks.

40
New cards

Call Stack

A special type of stack used by a program to keep track of function calls, storing information such as local variables and return addresses.

41
New cards

Return Address

The memory address in the call stack that indicates where to return control after a function call is completed.

42
New cards

Parameters

The values passed to a function that are used within that function to perform operations. These parameters are essential for providing input to functions. They can be required or optional, and may include various data types.

43
New cards

Stack Frame

Each instance of a function call that contains the function's parameters, local variables, and return address. It is created when a function is invoked and destroyed once the function execution is complete. A call stack is composed of stack frames.

44
New cards

Hashing

The process of transforming input data of any size into a fixed-size value or code, which is typically a hash value. Hashing is commonly used in data structures for indexing and quick data retrieval.

45
New cards

Hashing Algorithm

A method used to generate hash values from input data, ensuring that even small changes in input produce significantly different outputs. These algorithms are crucial for data integrity and efficient data retrieval in hash tables.

46
New cards

Hash table

A collection of items stored in such a way that allows for efficient access using a hash function to compute an index into an array of buckets or slots, from which the desired value can be found.

47
New cards

Synonym

Where the same hash is produced for different inputs, leading to potential data collisions.

48
New cards

Collision

An event that occurs when two different inputs produce the same hash value in a hashing algorithm, potentially compromising data integrity and retrieval.

49
New cards

Folding method

A hash function technique that divides the input data into segments and combines them to produce a single hash value, often used to minimize collisions.

50
New cards

Rehashing

The process of applying a new hash function to existing data in a hash table to resolve collisions or to improve performance. This is often done when the load factor of the hash table exceeds a certain threshold.

51
New cards

Graph

A data structure consisting of nodes connected by edges, used to represent relationships between pairs of objects.

52
New cards

Vertices

The individual nodes in a graph, representing entities or points of interest that are connected by edges.

53
New cards

Edges

The connections or arcs between vertices in a graph, representing the relationships or links between the nodes.

54
New cards

Undirected graph

A type of graph where the edges have no direction, meaning the connection between vertices is bidirectional.

55
New cards

Directed graph

A type of graph where the edges have a direction, indicating a one-way relationship between vertices.

56
New cards

Weighted

A type of graph where edges have associated weights or costs, often used to represent distances or values in a graph.

57
New cards

Adjacency matrix

A way of representing a graph using a 2D array to indicate whether pairs of vertices are adjacent or not, with rows and columns corresponding to vertices.

58
New cards

Adjacency list

A collection of lists or arrays used to represent a graph, where each list corresponds to a vertex and contains a list of its adjacent vertices.

59
New cards

Depth-first traversal

A graph traversal algorithm that explores as far as possible along each branch before backtracking, often implemented using a stack.

60
New cards

Breadth-first traversal

A graph traversal algorithm that explores all the neighbor vertices at the present depth prior to moving on to vertices at the next depth level, often implemented using a queue.

61
New cards

Applications of graphs

Graphs are used in various fields such as computer networks, social network analysis, pathfinding algorithms, roads between towns, tasks in a project, web pages and links.

62
New cards

Tree

A hierarchical data structure consisting of nodes, where each node has a value and a list of references to child nodes, typically used to represent hierarchical relationships.

63
New cards

Rooted tree

A tree in which one node is designated as the root, and all other nodes are descendants of that root, forming a hierarchical structure.

64
New cards

Root

The topmost node of a tree data structure, from which all other nodes descend. It serves as the starting point for traversing the tree.

65
New cards

Parent

A node in a tree that has one or more child nodes, establishing a direct hierarchical relationship.

66
New cards

Child

A node that is a direct descendant of another node in a tree structure. Each node can have multiple children, contributing to the tree's hierarchical organization.

67
New cards

Leaf

A node in a tree data structure that has no children, representing the end of a path in the hierarchy.

68
New cards

Subtree

A tree consisting of a node and all its descendants, representing a smaller tree structure within a larger tree.

69
New cards

Binary tree

A tree data structure where each node has at most two children, typically referred to as the left and right child.

70
New cards

Binary Search tree

A binary tree in which each node's left subtree contains only nodes with values less than the node's value, and the right subtree only nodes with values greater.

71
New cards

Pre-order traversal

A type of depth-first tree traversal where the nodes are processed in the order of root, left subtree, and then right subtree.

72
New cards

In-order traversal

A method of visiting all the nodes in a binary tree where the nodes are recursively visited in the order of left child, then the node itself, and finally the right child.

73
New cards

Post-order traversal

A type of depth-first tree traversal where the nodes are processed in the order of left subtree, right subtree, and then root.

74
New cards

Reverse Polish Notation

A mathematical notation in which every operator follows all of its operands, allowing for unambiguous expression evaluation without the need for parentheses.

75
New cards