0Still learning
Know0
Define "searching algorithm".
A searching algorithm is a set of precise step-by-step instructions that a computer can follow to efficiently locate specific data in massive datasets.
What is a linear search?
A linear search is a searching algorithm that starts with the first value in a dataset and checks every value one at a time until the value has been found or all values have been checked.
True or False?
A linear search can only be performed on ordered datasets.
False.
A linear search can be performed even if the values are not in order.
Enjoying Flashcards?
Tell us what you think
Define "searching algorithm".
A searching algorithm is a set of precise step-by-step instructions that a computer can follow to efficiently locate specific data in massive datasets.
What is a linear search?
A linear search is a searching algorithm that starts with the first value in a dataset and checks every value one at a time until the value has been found or all values have been checked.
True or False?
A linear search can only be performed on ordered datasets.
False.
A linear search can be performed even if the values are not in order.
What is a sorting algorithm?
Sorting algorithms are precise step-by-step instructions that a computer can follow to efficiently sort data in massive datasets.
Define "bubble sort"
A bubble sort is a simple sorting algorithm that starts at the beginning of a dataset and checks values in 'pairs', swapping them if they are not in the correct order.
What is a 'pass' in the context of a bubble sort?
In a bubble sort, a 'pass' refers to one full run of comparisons from beginning to end of the dataset.
True or False?
A bubble sort always requires multiple passes to sort a dataset.
False.
A bubble sort may require multiple passes, but it stops when there are no more swaps to make.
What is the primary difference between linear search and bubble sort?
The primary difference is that linear search is used to find a specific value in a dataset, while bubble sort is used to arrange all values in a dataset in a specific order.
In a bubble sort, when does the algorithm finish?
The bubble sort algorithm finishes when there are no more swaps to make in a complete pass through the dataset.
What does the term "swap" mean in the context of a bubble sort?
In a bubble sort, a "swap" refers to the exchange of positions between two adjacent elements when they are found to be in the wrong order.
Define "totalling" in algorithms
Totalling is keeping a running total of values entered into the algorithm.
What is counting in the context of algorithms?
Counting is when a count is incremented or decremented by a fixed value, usually 1, each time it iterates, keeping track of the number of times an action has been performed.
True or False?
Counting can only be used to increment values.
False.
Counting can be used to both increment and decrement values.
What does the term "max" refer to in algorithms?
In algorithms, "max" refers to finding the largest value in a list or dataset.
Define "min" in the context of algorithms.
In algorithms, "min" refers to finding the smallest value in a list or dataset.
How is the average (mean) typically calculated in algorithms?
The average (mean) is typically calculated by summing all values and dividing by the number of values.
What is the purpose of using a loop in a totalling algorithm?
The purpose of using a loop in a totalling algorithm is to iterate through all values in a list or dataset, adding each to the running total.
True or False?
The initial value of a total variable should always be set to 1.
False.
The initial value of a total variable is typically set to 0 before starting the summation process.
What does the LENGTH()
function typically do in pseudocode?
In pseudocode, the LENGTH()
function typically returns the number of elements in a list or array.
Define "iteration" in the context of algorithms.
Iteration in algorithms refers to the repetition of a process or set of instructions, often implemented using loops.