Computer Science, asked by fjar, 7 months ago

what are time complexities of each of following code segment​

Attachments:

Answers

Answered by ghulamsarvar
1

Answer:

O(n)

Explanation:

The inner loop of 10000 doesnt matter. Total time taken by the program will be (10000 x n). The crucial factor here would be driven by outer loop, as n increases the time will increase.

here 10000 is a constant and wont matter when computing Big O.

Similar questions