Time Complexity where loop variable is incremented by 1, 2, 3, 4 ..
What is the time complexity of below code? C/C++ Code #include <iostream> using namespace std; void fun(int n) { int j = 1, i = 0; while (i < n) { // Some O(1) task i = i + j; j++; } } C/C++ Code void fun(int n) { int j = 1, i = 0; while (i < n) { // Some O(1) task i = i + j; j++; } } Ja