Is searching an element in a Binary Search Tree (BST) faster than finding an element in a Binary Tree? If yes, explain why? (this is for Java programing)
Solution :
Yes, searching an element in a Binary Search Tree (BST) is faster than finding an element in a Binary Tree. Because Binary Search Tree is a node based binary tree which has right and left subtree and these subtrees are also BSTs. Binary Seach Tree has an Ordered Characteristics due to which the insertion, deletion and searching of an element is faster than Binary Tree. Binary Tree is unordered and nodes in binary tree are not arranged in order thats why insertion, deletion, and finding an element in binary tree is slower than BST.
Get Answers For Free
Most questions answered within 1 hours.