You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The BFS approach of is_binary_tree_bst function stores nodes in a queue but queue will never hold all the nodes at any point, so stating the space complexity as O(w) where w is the width of tree is more precise than O(n), please correct me if my understanding is wrong.
The text was updated successfully, but these errors were encountered:
The BFS approach of is_binary_tree_bst function stores nodes in a queue but queue will never hold all the nodes at any point, so stating the space complexity as O(w) where w is the width of tree is more precise than O(n), please correct me if my understanding is wrong.
The text was updated successfully, but these errors were encountered: