What is the most efficient way to fix the time complexity of an algorithm? |

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++) {` - int i=0; This will be executed only once.
- i < N; This will be executed N+1 times
- i++ This will be executed N times
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. |

Messages In This Thread |

What is the most efficient way to fix the time complexity of an algorithm? - by Sprint - 01-08-2023, 12:52 PM |