Algorithms and Data Structures Flashcards

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/104

flashcard set

Earn XP

Description and Tags

Flashcards covering key vocabulary related to algorithms and data structures.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

105 Terms

1
New cards

Algorithm

A finite sequence of well-defined, computer-implementable instructions, typically to solve a class of specific problems or to perform a computation.

2
New cards

Finiteness

An algorithm must complete after a finite number of steps.

3
New cards

Definiteness

Each step in an algorithm must be precisely defined and unambiguous.

4
New cards

Input

An algorithm requires one or more inputs from a predetermined range of acceptable values.

5
New cards

Output

An algorithm must produce one or more outputs that have a clear relationship to the inputs.

6
New cards

Effectiveness

An algorithm's operations must be basic and executable in a finite amount of time with available resources.

7
New cards

Generality

An algorithm should be applicable to a range of inputs, not just a single case.

8
New cards

Modularity

The principle of breaking down a problem into smaller, manageable modules.

9
New cards

Extensibility

An algorithm should be designed so that other programmers can easily use and adapt it.

10
New cards

Correctness

An algorithm should produce the desired output for all valid inputs.

11
New cards

Maintainability

An algorithm should be easy to understand and modify without introducing significant changes.

12
New cards

Functionality

An algorithm should solve a real-world problem by taking into account various logical steps.

13
New cards

Robustness

An algorithm should be able to clearly define and handle the problem it is designed to solve.

14
New cards

User-friendly

An algorithm's design should be easy to understand.

15
New cards

Simplicity

An algorithm should be easy to understand if it is simple.

16
New cards

Brute Force Algorithm

A straightforward approach that exhaustively tries all possible solutions.

17
New cards

Recursive Algorithm

A method that solves a problem by breaking it into smaller, similar subproblems.

18
New cards

Encryption Algorithm

An algorithm used to transform data into a secure, unreadable format.

19
New cards

Backtracking Algorithm

A trial-and-error technique used to explore potential solutions by undoing choices when they lead to an incorrect outcome.

20
New cards

Searching Algorithm

An algorithm designed to find a specific target within a dataset.

21
New cards

Sorting Algorithm

An algorithm aimed at arranging elements in a specific order.

22
New cards

Hashing Algorithm

An algorithm that converts data into a fixed-size hash value for rapid data access.

23
New cards

Divide and Conquer Algorithm

An algorithm that breaks a complex problem into smaller subproblems, solves them independently, and combines their solutions.

24
New cards

Greedy Algorithm

An algorithm that makes locally optimal choices at each step in the hope of finding a global optimum.

25
New cards

Dynamic Programming Algorithm

An algorithm that stores and reuses intermediate results to avoid redundant computations.

26
New cards

Randomized Algorithm

An algorithm that utilizes randomness in its steps to achieve a solution.

27
New cards

Base Case

The condition under which a recursive algorithm stops.

28
New cards

Recursive Case

The part of a recursive algorithm that breaks the problem down into smaller instances.

29
New cards

Stack

A data structure used to store each recursive call in a system.

30
New cards

Linear Search

A simple search algorithm that sequentially checks each element until the target is found.

31
New cards

Binary Search

A search algorithm that repeatedly divides the search interval in half, requiring a sorted data set.

32
New cards

Interpolation Search

Like binary search, but estimates the position of the target element based on its value within a uniformly distributed dataset.

33
New cards

Depth-First Search (DFS)

A graph/tree traversal algorithm that explores as far as possible along one branch before backtracking.

34
New cards

Breadth-First Search (BFS)

A graph/tree traversal algorithm that explores all neighbors at the present depth before moving on to nodes at the next depth level.

35
New cards

Bubble Sort

A simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.

36
New cards

Selection Sort

A sorting algorithm that repeatedly finds the minimum element from the unsorted portion and places it at the beginning.

37
New cards

Insertion Sort

A sorting algorithm that builds a sorted list one element at a time by inserting each new element into its correct position.

38
New cards

Merge Sort

A divide-and-conquer sorting algorithm that divides the list into halves, sorts each half, and then merges them.

39
New cards

Quicksort

A sorting algorithm that selects a “pivot” element and partitions the array around it, recursively sorting the partitions.

40
New cards

Heap Sort

A sorting algorithm that uses a binary heap data structure to build a max-heap and repeatedly extracts the maximum element.

41
New cards

Counting Sort

A non-comparative sorting algorithm that counts the occurrences of each element and uses this information to place elements.

42
New cards

Radix Sort

A sorting algorithm that sorts numbers by processing individual digits.

43
New cards

Bucket Sort

A sorting algorithm that distributes elements into buckets and sorts each bucket individually.

44
New cards

Shell Sort

A generalization of insertion sort that sorts elements at specific intervals and gradually reduces the interval.

45
New cards

Big O Notation

A notation that describes the upper bound on the time or space complexity of an algorithm, representing the worst-case scenario.

46
New cards

O(1) - Constant Time

The algorithm takes the same amount of time regardless of the size of the input.

47
New cards

O(log n) - Logarithmic Time

The runtime increases logarithmically as the input size increases.

48
New cards

O(n) - Linear Time

The runtime increases linearly with the size of the input.

49
New cards

O(n log n) - Log-Linear Time

The runtime increases more than linearly but less than quadratically.

50
New cards

O(n2) - Quadratic Time

The runtime increases quadratically with the size of the input.

51
New cards

O(2n) - Exponential Time

The runtime doubles with each additional element in the input.

52
New cards

O(n!) - Factorial Time

The runtime increases factorially with the size of the input.

53
New cards

Data Type

A classification that specifies the type of data that a variable can hold in programming.

54
New cards

Primitive Data Types

Basic building blocks of data in a programming language.

55
New cards

Integer

Holds whole numbers.

56
New cards

Floating Point

Holds numbers with fractional parts.

57
New cards

Character

Holds a single character.

58
New cards

Boolean

Holds a true or false value.

59
New cards

Composite Data Types

Data types constructed from primitive types.

60
New cards

Arrays

A collection of elements of the same data type.

61
New cards

Structures

A collection of different data types.

62
New cards

User-Defined Data Types

Data types created by the user, typically by combining primitive data types.

63
New cards

Enumeration (Enum)

A data type in programming that allows a variable to be a set of predefined constants.

64
New cards

Data Structure

A specific way of organizing and storing data in a computer so that it can be accessed and modified efficiently.

65
New cards

Abstract Data Type (ADT)

A theoretical model of a data structure that defines the behavior from the user's point of view, without specifying the underlying implementation.

66
New cards

Array

A collection of homogeneous elements stored in contiguous memory locations.

67
New cards

Linked List

A linear collection of elements called nodes, where each node contains data and a reference to the next node in the sequence.

68
New cards

Singly Linked List

Linked list where each node points to the next node.

69
New cards

Doubly Linked List

Linked list where each node points to both the next and previous nodes.

70
New cards

Circular Linked List

Linked list where the last node points back to the first node, forming a loop.

71
New cards

Stack

A linear data structure that follows the Last-In-First-Out (LIFO) principle.

72
New cards

Bag (Multiset)

A data structure that allows for storing a collection of elements where duplicate elements are allowed.

73
New cards

Queue

A linear data structure that follows the First-In-First-Out (FIFO) principle.

74
New cards

Deque

A linear data structure that allows insertion and deletion of elements from both the front and rear ends.

75
New cards

Hash Table

A data structure that maps keys to values using a hash function for efficient lookup.

76
New cards

Hashing

The process of mapping keys to indices in an array using a hash function.

77
New cards

Hash Function

A function that converts input (key) into a fixed-size value, typically an integer, which serves as an index in the hash table array.

78
New cards

Tree

A hierarchical data structure composed of nodes, where each node contains a value and references to child nodes.

79
New cards

Binary Tree

A tree where each node has at most two children (left and right).

80
New cards

Binary Search Tree (BST)

A binary tree where the left child contains values less than the parent, and the right child contains values greater than the parent.

81
New cards

Full Binary Tree

A binary tree in which every node has either 0 or 2 children.

82
New cards

Complete Binary Tree

A binary tree in which all levels are completely filled except possibly the last level, which is filled from left to right.

83
New cards

Perfect Binary Tree

A binary tree in which all interior nodes have two children and all leaves are at the same level.

84
New cards

Balanced Binary Tree

A binary tree where the height of the left and right subtrees of any node differ by at most one.

85
New cards

AVL Trees

A self-balancing binary search tree in which the height of the two child subtrees of any node differs by at most one.

86
New cards

Red-Black Trees

A binary search tree where the tree is kept balanced by performing rotations and color changes during insertions and deletions.

87
New cards

B-Trees

A self-balancing search tree in which nodes can have more than two children, commonly used in databases and file systems.

88
New cards

Heap

A specialized tree-based data structure that satisfies the heap property.

89
New cards

Set

An abstract data structure that stores unique elements, with no specific order.

90
New cards

Graph

A collection of nodes (vertices) connected by edges.

91
New cards

Directed Graph (Digraph)

A graph where all edges have a direction.

92
New cards

Undirected Graph

A graph where edges do not have direction.

93
New cards

Weighted Graph

A graph where edges have weights representing costs or distances.

94
New cards

Unweighted Graph

A graph where edges have no weights.

95
New cards

Dijkstra's Algorithm

A greedy algorithm for finding the shortest path from a single source vertex to all other vertices in a graph with non-negative edge weights.

96
New cards

Bellman-Ford Algorithm

A dynamic programming algorithm for finding the shortest path from a single source vertex to all other vertices in a graph, including graphs with negative edge weights, and can detect negative weight cycles.

97
New cards

Static Variable

A variable allocated memory at compile time, with a known type and size before the program runs.

98
New cards

Dynamic Variable

A variable allocated memory at runtime, with a type and size determined during program execution.

99
New cards

Strongly-Typed Language

A language where the type of a variable is strictly enforced, and implicit conversions between incompatible types are not allowed.

100
New cards

Weakly-Typed Language

A language where the type system is more flexible, allowing implicit conversions between types.