top button
Flag Notify
Site Registration

Difference between BST and Heap ?

+3 votes
564 views
Difference between BST and Heap ?
posted Nov 20, 2014 by Neeraj Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Binary Tree Search uses a binary search tree. In this method each element is scanned from input list and placed in its proper position in a binary tree. In binary tree each element is known as node. To place an element in its proper position the element is compared with the node element, and then it is placed in the left branch if the element is greater than or equal to the node then it is placed in the right branch. Now if we access the element according to in order traversal we would get the elements in ascending order.

answer Nov 24, 2014 by Rajneesh
Similar Questions
+5 votes

I came to know that ,construction of BST is possible by using PreOrder and PostOrder traversal but is it possible to construct a BST using InOrder traversal , if not then why?

+2 votes

How to find the smallest element in a Binary Tree (Not BST)? Sample C/C++ code would be helpful.

...