What is the complexity of the given code as a function of the problem size n? Show all details of your analysis.
for (int i=0; i < n; i++)
loops(i);
public static void loops (int x)
{
if (x < 0) return;
for (int i=0; i < x; i++)
for (int j=0; j < x; j++)
print ("hi");
}
Hello I am having trouble understanding how to calculate the time complexity of this code. Given that each loop is O(n) is this a O(n^3) program?