Programming - Foundations (Latest
Update ) | Questions and
Verified Answers | 100% Correct |
Grade A
Question:
Function stub
Answer:
a function definition whose statements have not yet been written.
Question:
function definition
Answer:
begins with the word Function, the function's name, and a list of comma-
separated parameters (if any) in parentheses, and a return indication.
,Question:
function call
Answer:
consists of the function name and parentheses, within which comma-
separated arguments (if any) appear
Question:
return statement
Answer:
In many programming languages, the return value is explicitly returned by a
return statement, which returns the specified value and immediately exits the
function
Question:
Algorithm
Answer:
is a sequence of steps that solves a problem, generating correct output for any
valid input values.
a sequence of steps to solve a computational problem or perform a calculation
A step-by-step procedure for solving a problem.
An algorithm is a sequence of steps for accomplishing a task.
,Question:
computational problem
Answer:
specifies an input, a question about the input that can be answered using a
computer, and the desired output.
Question:
NP-complete
Answer:
Problems are a set of problems for which no known efficient algorithm exists
Question:
Algorithm time efficiency
Answer:
The number of calculations required to solve a problem.
Question:
Algorithm efficiency
Answer:
typically measured by the algorithm's computational complexity
, Question:
Computation Complexity
Answer:
the amount of resources used by the algorithm.
Question:
Runtime complexity
Answer:
a function, T(N), that represents the number of constant time operations
performed by the algorithm on an input of size N.
Question:
Best case
Answer:
The scenario where an algorithm performs the minimum number of
operations.
Question:
Worst case
Answer:
The scenario where an algorithm performs the maximum number of
operations.