I might be wrong here, but I think your Logarithmic time O(log(n)) leads to infinite looping. i < n should be applied.
Logarithmic time O(log(n))
Thanks, @islomjon for noting that. It is fixed now
I was to say the same. I think you got an error here. Otherwise, great explanation, thanks for the post. It's really useful!
I didn't notice that. Good Catch! Actually I think it will never run since i will never be bigger than n.
i
n
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I might be wrong here, but I think your
Logarithmic time O(log(n))
leads to infinite looping. i < n should be applied.Thanks, @islomjon for noting that. It is fixed now
I was to say the same. I think you got an error here. Otherwise, great explanation, thanks for the post. It's really useful!
I didn't notice that. Good Catch! Actually I think it will never run since
i
will never be bigger thann
.