GATEverse Practice, past papers & mock tests
GATE 2007
AlgorithmsAlgorithm Analysis and Asymptotic NotationsmediumMCQ1 mark
What is the Asymptotic Notation of the following recursive function:
c
int DoSomething (int n) {
    if (n <= 2) return 1;
    else return (DoSomething (floor(sqrt(n))) + n);
}
Save your progress

Related Algorithms PYQs