Define “loop”.
It is a program construct that repeatedly executes the loop’s statements while the loop’s expression is true; when false, execution proceeds past the loop.
What is an “iteration”?
It is each time through a loop’s statements
Define “loop body”.
It is a list of sub-statements.
Define an “infinite loop”.
It is a loop that never stop iterating.
Define a “while loop”
It is a loop that repeatedly executes the loop boldly while the loop’s expression evaluates to true.
Define a “for loop”.
It is a loop consisting of a loop variable initialization, a loop expression, and a loop variable update that typically describes iterating for a specific number of times.
What is a “nested” loop?
It is a loop that appears in the body of another loop.
What are nested loops commonly referred to as?
inner loop and outer loop
Define “do-while loop”.
It is a loop that first executes the loop body’s statements, then checks the loop condition.
What is an “algorithm”?
It is a sequence of steps that solves a problem, generating correct output for any valid input values.
Define “algorithm time efficiency”.
It is the number of calculations required to solve a problem.
What is linear search?
It’s an algorithm that checks each item until found or until it reaches the end of the list. This type of algorithm may be slow.
What is binary search?
It’s an algorithm that checks the range’s middle. If the value is greater, search is made on upper half. If less, on lower half. Search continues until found, or no range remains.
What is a computational problem?
A problem that can be solved using a computer//It specifies an input, a question about the input that can be answered using a computer, and the desired output.
Define “longest common substring”
It is the longest common substring that exists in two inputs strings.
Define “Dijksta’s shortest path”
It is the shortest path from start vertex to each vertex graph.
What is “NP-complete”?
It is a set of problems for which no know efficient algorithm exits.