Top Algorithms Interview Questions
Mobiprep handbooks are free downloadable placement preparation resources that can help you ace any company placement process. We have curated a list of the 40 most important MCQ questions which are asked in most companies such as Infosys, TCS, Wipro, Accenture, etc. The placement handbooks also have detailed explanations for every question ensuring you revise all the questions with detailed answers and explanations.
Question
5
Explanation
What is best-case efficiency?
The best-case efficiency of an algorithm is its efficiency for the best-case input of size n, which is an input or inputs for which the algorithm runs the fastest among all possible inputs of that size.
Question
6
Explanation
What is average case efficiency?
The average case efficiency of an algorithm is its efficiency for an average case input of size n. It provides information about an algorithm behavior on a typical or random input.
(It is not the average of best case and worst case efficiencies).
Question
7
Explanation
Define O-notation?
>A function t[n] is said to be in O[g[n]], denoted by t[n] belongs to O[g[n]], if t[n] is bounded above by some constant multiple of g[n] for all large n, i.e., if there exists some positive constant c and some nonnegative integer n0 such that T [n] <=cg [n] for all n >= n0
>T[n] and g[n] are functions over non-negative integers
.
>Used for worst-case analysis
Question
8
Explanation
Define Ω-notation?
> A function t[n] is said to be in Ω [g[n]], denoted by t[n] ε Ω [g[n]], if t[n] is bounded below by some constant multiple of g[n] for all large n
>When we say that the running time of an algorithm is Ω(g(n)), we mean that no matter what particular input of size n is chosen for each value of n, the running time on that input is at least a constant times g(n), for sufficiently large n.
>Used to describe best case running times or lower bounds for algorithmic problems.