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

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation