Comment body goes here.
Not agree with solution
dhruvil1514
#3
For any input, the output is less than 2*n and as per the video discussion for calculating the time complexity in big-o notation we consider the fastest growing term and neglect the co-efficient in this case the fastest growing term is n and its co-efficient is 2 so the time-complexity will be o(n).