I have started studying Data Structures and Algorithms just a few days ago and still trying to grasp the concepts. I was learning about Big-O notations. I understand what O(1)-Constant Time Complexity is and have question.
void Method1(int n) {
int a = 10;
int b = 20;
int x = a + n;
int y = b * n;
Console.Writeline("{0}{1}", x, y);
}
The complexity of the above code is O(1) for a very large value of n. We are using value of N rather than doing processing N. Will the below method still have same complexity where n and m are very large numbers as inputs.
void Method1(int n, int m) {
int a = 10;
int b = 20;
int x = a + n;
int y = b * m;
Console.Writeline("{0}{1}", x, y);
}