Continue with your mobile number
In a balanced binary search tree (BST) , the height of the tree is maintained as O(log n)), ensuring that each level of the tree splits the search space roughly in half. This property allows searching for an element in the tree with logarithmic time complexity. For example, consider a balanced BST with 15 nodes. The height is approximately log 215≈4, so searching for any element will involve checking at most 4 nodes from the root to a leaf. The logarithmic reduction at each step (halving the search space) makes this approach efficient for large datasets. Balanced trees such as AVL or Red-Black trees maintain this logarithmic height through rotation operations during insertion and deletion, ensuring the O(log n) search time even after multiple modifications. Explanation of Incorrect Options: A) O(n) : This would be the time complexity for searching in an unbalanced BST or a linked list, where all nodes are skewed to one side. However, a balanced BST ensures O(log n) complexity. C) O(n2) This complexity is not applicable to BST search operations. It might appear in poorly optimized nested loops or certain pathological cases in other algorithms. D) O(1) Constant time search is achieved in hash tables, not in BSTs, as BSTs require traversing nodes to locate the target element. E) O(nlog n) This is the complexity of sorting algorithms like Merge Sort or Heap Sort, not searching in a BST.
Which of the following is correct with respect to sedition______________________
Under Section 143 of the Bharatiya Nyaya Sanhita, when the offense involves the trafficking of more than one person, what is the punishment?
According to the Aircraft Act in the interest of the safety of aircraft operations, if the Central Government decides to regulate the height of buildin...
As per Art. 24 of the Indian Constitution, no child of ________ years of age shall be working in any hazardous employment in a factory?
Written communication shall be made by ___________ to the President before a Proclamation is issued by him under Art. 352 (1).
An offer and acceptance to it must be in the :
An application for arbitration shall be filed___
According to Code 59 (1) of the Occupational Safety, Health and Working Conditions Code, 2020, what is the time limit for making an application to the ...
In, “Neither accusation is true”, the word. “neither” is a: =
As per section 3 of the General Insurance Business (Nationalisation) Act Corporation means_________________