Programming Algorithms Explained
- 25Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
25 questions
- 1The specific steps used to complete a computation are referred to as an_____.
Hint
This term comes from a Persian polymath and describes the method or process to solve a problem.
Answer
algorithm
- 2The efficiency of an algorithm is generally better if it takes fewer_____to compute.
Hint
Consider what makes an algorithm faster or slower in its execution.
Answer
steps
- 3The term 'algorithm' originated from the Persian polymath Muḥammad ibn Mūsā al-Khwārizmī, who was one of the fathers of_____.
Hint
This mathematical field deals with symbols and the rules for manipulating these symbols.
Answer
algebra
- 4The crafting of efficient algorithms led to the evolution of the modern discipline known as_____Science.
Hint
This field studies computation and information.
Answer
Computer
- 5In computer science, a series of items like airfare prices is typically referred to as an_____.
Hint
This data structure stores a fixed-size sequential collection of elements of the same type.
Answer
array
- 6The sorting algorithm that involves repeatedly finding the smallest element from the unsorted part and putting it at the beginning is called_____Sort.
Hint
This algorithm 'selects' the minimum element from the remaining unsorted array and swaps it with the first unsorted element.
Answer
Selection
- 7In Selection Sort, a FOR loop is nested inside another FOR loop, meaning that sorting N items requires roughly N_____loops.
Hint
This refers to the relationship where an operation is performed N times for each of N items.
Answer
squared
- 8The relationship of input size to the number of steps an algorithm takes to run is characterized by its computational_____.
Hint
This term describes how much time or space an algorithm requires to run as a function of its input size.
Answer
complexity
- 9Computer Scientists use 'Big_____Notation' to describe the order of growth of an algorithm's running time.
Hint
This mathematical notation describes the limiting behavior of a function when the argument tends towards a particular value or infinity.
Answer
O
- 10For an array with 8 items, if Selection Sort has a complexity of N squared, the number of operations would be_____.
Hint
Perform the N squared calculation for N=8.
Answer
64
- 11If an array's size increases from 8 items to 80 items, the running time of Selection Sort increases by a factor of_____.
Hint
Compare the N squared values for N=8 and N=80. (802/82)
Answer
100
- 12The_____Sort algorithm works by repeatedly splitting an array into halves until individual items are reached, then merging them back in sorted order.
Hint
This algorithm's name reflects its two main operations: dividing and combining.
Answer
Merge
- 13The first step of Merge Sort is to check if the size of the array is greater than_____, and if so, split it into two halves.
Hint
Consider the base case for when splitting should stop in a recursive sorting algorithm.
Answer
1
- 14When merging two sorted arrays in Merge Sort, the algorithm compares the first numbers in each array and takes the_____one first.
Hint
To maintain sorted order, you always pick the smallest available element from the two sub-arrays.
Answer
lowest
- 15The computational complexity of Merge Sort is N times the_____of N.
Hint
This part of the complexity comes from the repeated splitting of the array.
Answer
Log
- 16For an array of 8 items, Merge Sort requires_____splits, as Log base 2 of 8 equals this number.
Hint
Calculate log28.
Answer
3
- 17If an array size doubles from 8 to 16, the number of split steps in Merge Sort increases by only_____.
Hint
Compare log28 and log216.
Answer
1
- 18A_____is a network of nodes connected by lines, often used to represent maps with cities and roads.
Hint
This mathematical structure consists of vertices (nodes) and edges (lines).
Answer
graph
- 19In a graph, each line connecting nodes can be labeled with a_____or weight, representing factors like travel time.
Hint
This value indicates the 'expense' or 'distance' associated with traversing an edge.
Answer
cost
- 20Trying every single possible path exhaustively to find the fastest route in a graph is an example of a_____force approach.
Hint
This type of approach involves systematically checking all possible solutions to find the correct one.
Answer
brute
- 21A brute force approach to sorting, by trying every permutation, would have an N_____complexity.
Hint
This mathematical operation involves multiplying a number by every positive integer less than it.
Answer
factorial
- 22The classic algorithmic solution for finding the shortest path in a graph was invented by Edsger Dijkstra and is named_____algorithm.
Hint
This algorithm efficiently finds the shortest paths between nodes in a graph, especially with non-negative edge weights.
Answer
Dijkstra's
- 23Dijkstra's algorithm always starts with the node that has the_____cost.
Hint
This ensures the algorithm systematically expands from the most promising paths.
Answer
lowest
- 24Dijkstra's original algorithm had a complexity of the number of nodes in the graph_____.
Hint
Similar to Selection Sort, the initial version of this algorithm showed this growth pattern.
Answer
squared
- 25An improved version of Dijkstra's algorithm has a complexity of the number of nodes times the log of the number of nodes, PLUS the number of_____.
Hint
These represent the connections between nodes in the graph.
Answer
lines

Ask anything
We've read this whole study set, so questions about it get the best answers.