engineering recuitment OPSC Assistant Industries Officer Mock Test 2025 Programming and Data Structure Programming in C
What is the running time of the following recursive function?
function(int n)
{
if (n <= 1)
return;
for (i=1 ; i <= 3 ; i++ )
function (n − 1).
}1
O(3n+1)
2
O(3n)
3
O(3n-1)
4
None of above