![]() ![]() \(O(log\ n)\) is logarithmic (base 2) time often characterized by a loop. ![]() ![]() \(O(n^2)\) is the time squared often characterized by a nested loop.\(O(n)\) is linear time often characterized by a single loop.That is, the execution time can be expressed as a polynomial function of the size Most of the algorithms we cover in introductory courses tend to be polynomial Something that is easy to learn but takes a lifetime to master (to borrowĪ phrase from the famous Othello board game). In this lab, you get your chance to learn a bit more about performance using a timer with sufficiently high resolution (the Stopwatch gives.making sure that we try a range of sizes to observe the effects of scaling.making sure each algorithm is working with the same data.In the sorting notes (see Sorting Algorithms) we took advantage of a few ideasīenchmarking to compare the various approaches. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |