August 2024
Intermediate to advanced
516 pages
11h 47m
English
In the previous chapters, you learned how to use Big O notation to express the time complexity of code. As you’ve seen, quite a few details go into Big O analysis. In this chapter, we’ll use everything you’ve learned so far to analyze the efficiency of practical code samples that might be found in real-world codebases.
Determining the efficiency of our code is the first step in optimizing it. After all, if we don’t know how fast our code is, how would we know if our modifications would make it faster?
Additionally, once we know how our code is categorized in terms of Big O notation, we can make a judgment call as to whether it may need optimization in the first place. For example, an algorithm that is O(N2) is ...
Read now
Unlock full access