![]() |
What is the most efficient way to fix the time complexity of an algorithm? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: What is the most efficient way to fix the time complexity of an algorithm? (/showthread.php?tid=86086) |
What is the most efficient way to fix the time complexity of an algorithm? - Sprint - 01-08-2023 I have looked through Google and resource for a clear and straightforward explanation of how to calculate time complexity, but I have yet to find one. What information do I already have? The following code is: Code: char h = 'y'; // This will be executed 1 time The following loop is like the one below: Code: for (int i = 0; i < N; i++) {
I am familiar with the basics of time complexity calculations but have seen complexity measured in terms of O(N), O(n^2), O(log n), O(n!), and other forms. |