2 2 votes Consider the given two statements.$\mathrm{S} 1:$ Depth-first search is asymptotically faster than breadth-first search.$\mathrm{S} 2:$ Deleting an element from a binary search tree takes $\mathrm{O}(\mathrm{lg} n)$ time in the worst case.Which of the following is correct about $\mathrm{S} 1$ and $\mathrm{S} 2?$$\mathrm{S} 1$ is correct but $\mathrm{S} 2$ is wrong.$\mathrm{S} 2$ is correct but $\mathrm{S} 1$ is wrong.Both are correctBoth are False Algorithms goclasses_da_dsa_tw6 goclasses algorithms graph-algorithms one-mark + – GO Classes 452 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
2 2 votes $\mathrm{S} 1$ is False. They both take $O\text{(V + E)}$ time. $\mathrm{S} 2$ is False. It takes $O(h)$ time and for an ordinary binary search tree, $h$ can be $\omega(\lg n)$. GO Classes answered Oct 16, 2024 GO Classes comment Share Follow 0 reply Please log in or register to add a comment.