Finiteness Definiteness C949v4 Study Guide

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

1/111

flashcard set

Earn XP

Description and Tags

Fill-in-the-blank flashcards covering major concepts from the C949v4 algorithms and data structures study guide.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

112 Terms

1
New cards

The requirement that an algorithm eventually stops after a finite number of steps is called ___.

Finiteness

2
New cards

The property that every step of an algorithm is precisely and unambiguously specified is ___.

Definiteness

3
New cards

Values supplied to an algorithm before processing are its ___.

Inputs

4
New cards

The result produced after an algorithm finishes is known as the ___.

Output

5
New cards

If every operation of an algorithm can be performed in a finite amount of time using basic operations, the algorithm satisfies ___.

Effectiveness

6
New cards

The ability of one algorithmic solution to solve a whole class of problems rather than a single instance is called ___.

Generality

7
New cards

Breaking a problem into smaller, self-contained modules demonstrates the algorithmic feature of ___.

Modularity

8
New cards

The ease with which another designer can build on or expand an existing algorithm is its ___.

Extensibility

9
New cards

An algorithm that always produces the correct output for all valid inputs satisfies the factor of ___.

Correctness

10
New cards

Designing an algorithm so future changes require minimal modification supports ___.

Maintainability

11
New cards

Considering practical, real-world logical steps in an algorithm refers to its ___ factor.

Functionality

12
New cards

An algorithm that clearly defines the problem and handles unexpected input shows ___.

Robustness

13
New cards

If an algorithm is difficult to understand it lacks the ___ characteristic.

User-friendliness

14
New cards

Algorithms that are straightforward and easy to follow demonstrate ___.

Simplicity

15
New cards

Trying every possible solution until one works exemplifies the ___ algorithm type.

Brute Force

16
New cards

An algorithm that calls itself on smaller sub-instances until a base case is reached is a ___ algorithm.

Recursive

17
New cards

Transforming plaintext to ciphertext for privacy relies on an ___ algorithm.

Encryption

18
New cards

Systematically exploring choices and undoing wrong paths exemplifies ___ algorithms.

Backtracking

19
New cards

Algorithms whose goal is to locate a target value in data are called ___ algorithms.

Searching

20
New cards

Arranging items into a particular order is done by a ___ algorithm.

Sorting

21
New cards

Converting data to fixed-size codes for quick access uses a ___ algorithm.

Hashing

22
New cards

Dividing a task, conquering subproblems, and combining answers describes ___ algorithms.

Divide and Conquer

23
New cards

Making the best local choice at each stage typifies a ___ algorithm.

Greedy

24
New cards

Saving and reusing sub-results to avoid recomputation is the hallmark of ___ programming algorithms.

Dynamic

25
New cards

Algorithms that incorporate randomness in their steps are called ___ algorithms.

Randomized

26
New cards

In recursion, the simplest situation that stops further calls is the ___.

Base Case

27
New cards

The portion of a recursive algorithm that reduces the problem size is the ___.

Recursive Case

28
New cards

Each active recursive call is stored on the program's ___.

System Call Stack

29
New cards

The mathematical definition n! = n × (n−1)! illustrates the ___ problem solved recursively.

Factorial

30
New cards

Recursive solutions are often more elegant than iterative ones due to their ___.

Simplicity

31
New cards

A drawback of deep recursion is potential ___ overflow.

Stack

32
New cards

Sequentially examining each element until a match is found defines ___ search.

Linear

33
New cards

Linear search has a worst-case time complexity of ___.

O(n)

34
New cards

Dividing a sorted array in half repeatedly to find an element describes ___ search.

Binary

35
New cards

Binary search requires the data to be ___.

Sorted

36
New cards

The average-case time complexity of binary search is ___.

O(log n)

37
New cards

Estimating the likely position of a key in uniformly distributed data is the idea behind ___ search.

Interpolation

38
New cards

Exploring as far as possible along each branch before backtracking characterizes ___.

Depth-First Search (DFS)

39
New cards

Visiting all neighbors at the current depth before moving deeper is the strategy of ___.

Breadth-First Search (BFS)

40
New cards

Swapping adjacent out-of-order elements so big values "float" to the end is ___ sort.

Bubble

41
New cards

Repeatedly selecting the minimum remaining element and moving it to the front is ___ sort.

Selection

42
New cards

Building a sorted subsection by inserting each new element into its proper place defines ___ sort.

Insertion

43
New cards

Recursively splitting a list, sorting halves, and combining them is ___ sort.

Merge

44
New cards

Partitioning around a pivot and recursively sorting partitions is characteristic of ___.

Quicksort

45
New cards

Using a binary heap to repeatedly extract the maximum element implements ___ sort.

Heap Sort

46
New cards

Counting occurrences of each key to place items directly is ___ sort.

Counting

47
New cards

Sorting numbers digit by digit (often using counting sort inside) is ___ sort.

Radix

48
New cards

Distributing items into buckets and sorting each bucket embodies ___ sort.

Bucket

49
New cards

Sorting elements that are far apart and gradually reducing the gap is done by ___ sort.

Shell

50
New cards

Algorithms with constant-time complexity are denoted ___.

O(1)

51
New cards

Algorithms whose complexity grows logarithmically with input size are ___.

O(log n)

52
New cards

Linear-time algorithms have complexity ___.

O(n)

53
New cards

Merge sort and heap sort run in ___ time complexity.

O(n log n)

54
New cards

Bubble, insertion, and selection sorts are examples of ___ time algorithms.

O(n^2)

55
New cards

Algorithms whose running time doubles with each additional input element have ___ complexity.

Exponential (O(2^n))

56
New cards

Brute-force permutation algorithms often have ___ time complexity.

Factorial (O(n!))

57
New cards

In Big-O, constant multipliers are ignored; thus O(3n) simplifies to ___.

O(n)

58
New cards

Of the terms in O(n² + n + log n), the dominant term kept is ___.

59
New cards

Changing the base of a logarithm only introduces a constant, so O(log₂ n) is simplified to ___.

O(log n)

60
New cards

Nested loops where each runs n times result in overall complexity ___.

O(n²)

61
New cards

A basic building-block type like int or char is a ___ data type.

Primitive

62
New cards

A collection of related fields treated as a single unit is called a ___.

Record

63
New cards

A data structure of contiguous memory allowing O(1) indexed access is an ___.

Array

64
New cards

Nodes linked by pointers form a ___ list.

Linked

65
New cards

A LIFO data structure where push adds and pop removes from the same end is a ___.

Stack

66
New cards

A collection permitting duplicates and focusing on element counts is called a ___.

Bag (Multiset)

67
New cards

A FIFO data structure where enqueue adds at rear and dequeue removes from front is a ___.

Queue

68
New cards

Allowing insertion and deletion at both ends, a ___ combines stack and queue features.

Deque

69
New cards

Key–value storage with average O(1) operations is provided by a ___.

Hash Table

70
New cards

The formulas childLeft = 2i+1 and childRight = 2i+2 apply to nodes in a ___.

Binary Heap

71
New cards

In a max-heap, every parent node is ___ than or equal to its children.

Greater

72
New cards

A hierarchical structure with a single root and child nodes is a ___.

Tree

73
New cards

A binary search tree keeps left child values ___ the parent.

Less than

74
New cards

A BST that self-balances by keeping height differences ≤1 is an ___ tree.

AVL

75
New cards

A self-balancing BST using red and black node colors is a ___ tree.

Red-Black

76
New cards

A multi-way search tree optimized for disk access in databases is a ___.

B-Tree

77
New cards

Visiting Node → Left → Right is ___ traversal.

Pre-Order (NLR)

78
New cards

Left → Node → Right traversal of a BST outputs keys in ___ order.

Sorted (Ascending)

79
New cards

The traversal order Left → Right → Node is called ___.

Post-Order (LRN)

80
New cards

A set stores only ___ elements, ignoring duplicates.

Unique

81
New cards

Edges with optional direction connecting vertices define a ___.

Graph

82
New cards

Choosing the smallest known distance vertex repeatedly finds shortest paths in ___ algorithm.

Dijkstra's

83
New cards

An algorithm that can handle negative edge weights and detect negative cycles is ___.

Bellman-Ford

84
New cards

Automatically reclaiming unused memory at runtime is called ___.

Garbage Collection

85
New cards

In reference counting, when the count reaches ___, the object is deleted.

Zero

86
New cards

Memory allocated at compile time with fixed size is a ___ variable.

Static

87
New cards

Memory allocated on the heap at runtime is known as ___ allocation.

Dynamic

88
New cards

Languages that forbid implicit type coercion are considered __-typed.

Strongly

89
New cards

JavaScript allows automatic conversions, so it is a __-typed language.

Weakly

90
New cards

The operator that both adds and assigns in one step is ___.

+=

91
New cards

In standard precedence, multiplication is evaluated ___ addition.

Before

92
New cards

A loop that continues while a condition remains True is a ___ loop.

While

93
New cards

The statement that immediately exits the nearest loop is ___.

break

94
New cards

Skipping the rest of the current iteration and continuing the loop uses the ___ statement.

continue

95
New cards

Choosing among many constant values of a single expression can be done with a ___ statement (in C/C++).

switch-case

96
New cards

Combining data and behavior, a ___ defines objects in OOP.

Class

97
New cards

A special method that initializes a newly created object is the ___.

Constructor

98
New cards

Hiding internal details behind public interfaces illustrates ___.

Encapsulation

99
New cards

Allowing a subclass to provide its own version of a parent method demonstrates ___.

Polymorphism

100
New cards

The formula key % size used to compute an index is part of the ___ function.

Hash