O(n)
O(n2)
Here is a code for an integer variable n
while (n > 0)
{
n = n/10; // Use integer division
}
What is the worst case scenario analysis for the above loop?
Correct Answer: O(log n)
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Data Structures And Algorithms MCQ Questions