Funky Analysis

What is the time complexity of funky(N)?

1
2
3
4
5
6
7
8
from math import *

def funky( N ):
    root = sqrt( N )
    if N <= 10:
        return (3 * N ) * ( N / root )

    return funky(root) * funky(root)

Details and Assumptions

  • Assume the square root function takes constant time.
×

Problem Loading...

Note Loading...

Set Loading...