When you are in an interview, you might be asked how efficient an algorithm is. This is a case for Big-O analysis. An algorithm whose run time grows linearly with the number of records it processes is said to be on the order of O(n). That is good efficiency.
Other Big-O rates are O(1), O(nlogn), and O(n^2). In the Big-O system, you eliminate all but the highest order time factor. So if an algorithm has an efficiency of O(n^2) + O(n), we just call it O(n^2). The O(n) part of the equation is insignificant.
Some bonus tips for analyzing efficiency are to consider both the average and worst case times for an algorithm to complete. Next time I will briefly talk about data structures like linked lists. Say that fast 3 times.
Free Laundry
-
Apparently a lot of apartment buildings have coin operated laundry machines
in the basement. And guess what? You can order a key to unlock the payment
me...