What is the time complexity of following function fun()? For i = 1, the inner loop is executed n times. For i = 2, the inner loop is executed approximately n/2 times. For i = 3, the inner loop is executed approximately n/3 times. For i = 4, the inner loop is executed approximately n/4 […]
The post An interesting time complexity question appeared first on GeeksforGeeks.