O(1)

, 2.O(log n) , 3.

O(n)

, 4.

O(n2)

">
MCQs > IT & Programming > Data Structures And Algorithms >

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?

Data Structures And Algorithms MCQs

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?

Answer

Correct Answer: O(log n)

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Data Structures And Algorithms Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Data Structures And Algorithms Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it