When traced, the above program outputs numbers up to 3. Now, the problem here is how do I find the time complexity of the above program. As per my analysis, it is O(n), but wherever I searched, I find it to be O(1).But exactly how?
When traced, the above program outputs numbers up to 3. Now, the problem here is how do I find the time complexity of the above program. As per my analysis, it is O(n), but wherever I searched, I find it to be O(1).But exactly how?