Binary Search Trees Quiz

SecureParrot avatar
SecureParrot
·
·
Download

Start Quiz

Study Flashcards

Questions and Answers

What is the time complexity of the overall search in a Binary Search Tree (BST)?

$O(h)$

In the context of the sorted map ADT, which methods use the search as a subroutine?

get, put, and remove

What is the maximum number of positions that TreeSearch is called on for a path in a BST?

$h + 1$

What does the TreeSearch algorithm return if the key is not found?

<p>null</p> Signup and view all the answers

In the example of searching for key 4 in a BST, which positions are visited in the search?

<p>2, 1, 6, 4</p> Signup and view all the answers

More Quizzes Like This

Use Quizgecko on...
Browser
Browser