Exercises
- Find the time complexity of the following Python snippets:
-
i=1 while(i<n): i*=2 print("data")
-
i =n while(i>0): print('complexity') i/ = 2
-
for i in range(1,n): j = i while(j<n): j*=2
-
i=1 while(i<n): print('python') i = i**2
Join our community on Discord
Join our community’s Discord space for discussions with the author and other readers: https://packt.link/MEvK4