Quiz: Algorithm Analysis
Test your understanding of algorithm analysis in coding interviews.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
What is the time complexity of the following code?
int findMax(const std::vector<int>& arr) {
int maxVal = arr[0];
for (int num : arr) {
if (num > maxVal) {
maxVal = num;
}
}
return maxVal;
}
A.
B.
C.
D.
1 / 5