[Solved] What is the time complexity of the juggling algorithm to rotate an array?

What is the time complexity of the juggling algorithm to rotate an array?

a) O(1)
b) O(n)
c) O(d)
d) O(n*d)

Answer: b
Explanation: The time complexity of the juggling algorithm is O(n). Its auxiliary space complexity is O(1).

Comments