Teaching UGC NET Mock Test Series 2025 (Paper 1 & 2) Programming and Data Structure Programming in C Function Recursion
Let 'n' denote a positive integer. Suppose a function F is defined as
\(f(n)=\left\{\begin{aligned} 0,& & n =1 \\ f\left(\left\lfloor\frac{n}{2}\right\rfloor+1\right), & & n>1 \end{aligned}\right.\)
What is f(25)? and what does this function find?
1
\(4,\left\lfloor\log_2n\right\rfloor\)
2
\(14,\left\lfloor\log_2n\right\rfloor\)
3
\(4,\left\lfloor\frac{n}{2}\right\rfloor\)
4
\(14,\left\lfloor\frac{n}{2}\right\rfloor\)