Computer Sciences > Gate 2022 > 1
Consider the following recurrence:
f(1) = 1;
f(2n) = 2f(n) -1, for n≥1;
f(2n+1) = 2f(n) +1, for n≥1;

Then, which of the following statements is/are TRUE?
A
f(2n–1)=2n–1
B
f(2n)=1
C
f(5⋅2n)=2n+1+1
D
f(2n+1)=2n+1

Explanation

Correct : a,b,c

Similar Questions

What is the worst-case time complexity of insertion in an AVL tree?
Question #23 Medium
Which operations on a binary search tree have O(h) complexity?
Question #31 Easy
Compare search complexities of sorted array vs balanced BST.
Question #47 Hard

Related Topics

Data Structures Binary Search Tree Time Complexity Algorithm Analysis Tree Algorithms Computer Science