Complexity & Efficiency Awareness MCQs

Topic-wise practice questions for Problem Solving & Analytical Skills. Test your knowledge, check solutions on demand, and pace your preparation.

Zero-leak answer engine • Rate-limited explanations
Practice in Timed Mode
Q11medium
You are optimizing a web crawler. You decide to store a list of already-visited URLs in a Set to ensure you don't visit the same site twice. This increases memory usage but speeds up the check. This is an example of:
Q12hard
A social media platform wants to suggest "Mutual Friends." For every friend a user has (N), the system checks every friend that friend has (N). What is the time complexity of this specific operation?
Q13hard
Trace the time complexity of this loop:

for (int i = 1; i < N; i = i * 2) {
    print(i);
}
Q14hard
In a "Log-Linear" complexity algorithm (O(N log N)), what happens to the runtime if the input size N doubles?
Q15hard
(Code-Analysis) What is the time complexity of this nested loop?

for (int i = 0; i < N; i++) {
    for (int j = 0; j < 500; j++) {
        print(i, j);
    }
}
Q16hard
An algorithm processes an array of size N. It contains two separate (not nested) loops: the first loop runs N times, and the second loop runs N times. What is the Big- O complexity?
Q17easy
If an O(2^N) algorithm takes 1 millisecond for N = 10, how long will it take for N = 30?
Q18hard
(Code-Analysis) What is the space complexity of an algorithm that creates a 2D matrix of size N x N to store results?
Q19hard
Which of the following describes "Space Complexity"?
Q20medium
If an algorithm's runtime is O(1), how does the execution time change if you increase the input size from 1,000 to 1,000,000?