Question
Write the time complexity of the above program code if it is written differently

Answer

Calculation of processing time:

Total: 21 operations => 21 units of processing time Therefore, the time Complexity is of the order O(1).

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free