eli5 logarithmic algorithms for complexity analysis

373 views

Despite taking multiple math courses that have each explained them, and now a computer science course that requires knowledge of them, logarithms make no sense to me. Specifically their application to Big-O and complexity for computer science, like how does one make an algorithm that follows a logarithmic complexity?

In: 1

9 Answers

Anonymous 0 Comments

Oh boy, I don’t think I could explain that to a 5 year old but uuhhh here we go.

In code for every loop you add to the complexity, as you reduce the looping you can get down to a linear complexity. If you are able to split the work, you can narrow that down again to logarithmic complexity.

If you look at what goes on in sorting algorithms, bubble vs merge, one has to look at all the values over and over again, whereas the other does a comparison and is able to make an assumption the next time

You are viewing 1 out of 9 answers, click here to view all answers.