Monday, March 8, 2021

what is the running time of inserting into a binary search tree?

 big O of  logn


things related to binary search are often  big O of logn


if you have a well-balanced binary tree, if it has a total of n nodes, then  log-based-2-of-n will be the height of the tree


source: harvard, cs50, david malan



No comments:

Post a Comment