Introducing Big O notation

Big O notation is a good way to approximate the speed in which the algorithm you've chosen will change with the size of the data that's passed to your algorithm. Big O notation is often described as the growth behavior of a function, specifically its upper limit. Big O notation is broken down into classes. The most common classes that are described are O(1), O(log n), O(n), O(n log n), O(n2), and O(2n). Let's take a quick look at each of these algorithms, their definitions, and a practical example of them in Go.

A graph of these common classes is as follows. The source code for generating this plot can be found at https://github.com/bobstrecansky/HighPerformanceWithGo/blob/master/2-data-structures-and-algorithms/plot/plot.go:

This Big O notation graph gives us a visual representation of the different algorithms that are commonly used in computer software.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.214.155