<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>binary search tree definition - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/binary-search-tree-definition/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/binary-search-tree-definition/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Mon, 13 Sep 2021 06:13:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>binary search tree definition - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/binary-search-tree-definition/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>What is Binary Search Tree ?</title>
		<link>https://www.wikitechy.com/interview-questions/data-structure/what-is-binary-search-tree/</link>
					<comments>https://www.wikitechy.com/interview-questions/data-structure/what-is-binary-search-tree/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Tue, 13 Jul 2021 17:58:10 +0000</pubDate>
				<category><![CDATA[Data Structure]]></category>
		<category><![CDATA[Accenture interview questions and answers]]></category>
		<category><![CDATA[allevel order traversal]]></category>
		<category><![CDATA[Altimetrik India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Applied Materials interview questions and answers]]></category>
		<category><![CDATA[balanced binary search tree]]></category>
		<category><![CDATA[Bharti Airtel interview questions and answers]]></category>
		<category><![CDATA[binary numbers list]]></category>
		<category><![CDATA[binary search]]></category>
		<category><![CDATA[binary search algorithm]]></category>
		<category><![CDATA[binary search code]]></category>
		<category><![CDATA[binary search in data structure]]></category>
		<category><![CDATA[binary search program]]></category>
		<category><![CDATA[binary search python]]></category>
		<category><![CDATA[binary search tree algorithm]]></category>
		<category><![CDATA[binary search tree c++]]></category>
		<category><![CDATA[binary search tree definition]]></category>
		<category><![CDATA[binary search tree delete iterative]]></category>
		<category><![CDATA[binary search tree delete node c++]]></category>
		<category><![CDATA[binary search tree deletion]]></category>
		<category><![CDATA[binary search tree deletion algorithm in c]]></category>
		<category><![CDATA[binary search tree deletion in c]]></category>
		<category><![CDATA[binary search tree example]]></category>
		<category><![CDATA[binary search tree insertion]]></category>
		<category><![CDATA[binary search tree insertion and deletion program in c]]></category>
		<category><![CDATA[binary search tree java]]></category>
		<category><![CDATA[binary search tree program in c]]></category>
		<category><![CDATA[binary search tree program in c++ using linked list]]></category>
		<category><![CDATA[binary search tree python]]></category>
		<category><![CDATA[binary search tree python library]]></category>
		<category><![CDATA[binary search tree recursive delete c++]]></category>
		<category><![CDATA[binary search tree traversal]]></category>
		<category><![CDATA[binary search tree traversal inorder preorder postorder example]]></category>
		<category><![CDATA[binary tree]]></category>
		<category><![CDATA[binary tree program in data structure]]></category>
		<category><![CDATA[binary tree traversal program in cinorder traversal iterativebinary tree traversal program in c++]]></category>
		<category><![CDATA[binary tree vs binary search tree]]></category>
		<category><![CDATA[BMC Software interview questions and answers]]></category>
		<category><![CDATA[Capgemini interview questions and answers]]></category>
		<category><![CDATA[CASTING NETWORKS INDIA PVT LIMITED interview questions and answers]]></category>
		<category><![CDATA[CGI Group Inc interview questions and answers]]></category>
		<category><![CDATA[Chetu interview questions and answers]]></category>
		<category><![CDATA[Ciena Corporation interview questions and answers]]></category>
		<category><![CDATA[Collabera Te interview questions and answers]]></category>
		<category><![CDATA[construct binary tree from inorder and postorder travers]]></category>
		<category><![CDATA[delete node from binary search tree]]></category>
		<category><![CDATA[deletion by merging in binary search tree]]></category>
		<category><![CDATA[deletion in binary search tree examples]]></category>
		<category><![CDATA[deletion in binary search tree in c++ program]]></category>
		<category><![CDATA[Dell International Services India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[difference between binary tree and binary search tree]]></category>
		<category><![CDATA[Flipkart interview questions and answers]]></category>
		<category><![CDATA[Genpact interview questions and answers]]></category>
		<category><![CDATA[Globallogic India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[IBM interview questions and answers]]></category>
		<category><![CDATA[Indecomm Global Services interview questions and answers]]></category>
		<category><![CDATA[Mphasis interview questions and answers]]></category>
		<category><![CDATA[NetApp interview questions and answers]]></category>
		<category><![CDATA[optimal binary search tree]]></category>
		<category><![CDATA[Oracle Corporation interview questions and answers]]></category>
		<category><![CDATA[polaris financial technology interview questions and answers]]></category>
		<category><![CDATA[recursive binary search]]></category>
		<category><![CDATA[recursive binary search tree python]]></category>
		<category><![CDATA[SAP Labs India Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Sapient Consulting Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Tech Mahindra interview questions and answers]]></category>
		<category><![CDATA[Tracxn Technologies Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[tree traversal examples]]></category>
		<category><![CDATA[tree traversal questions]]></category>
		<category><![CDATA[UnitedHealth Group interview questions and answers]]></category>
		<category><![CDATA[validate binary search tree]]></category>
		<category><![CDATA[what is binary]]></category>
		<category><![CDATA[what is binary search]]></category>
		<category><![CDATA[what is binary search algorithm]]></category>
		<category><![CDATA[what is binary search in data structure]]></category>
		<category><![CDATA[what is binary search tree]]></category>
		<category><![CDATA[what is binary search tree in data structure]]></category>
		<category><![CDATA[what is optimal binary search tree]]></category>
		<category><![CDATA[Wipro Infotech interview questions and answers]]></category>
		<category><![CDATA[WM Global Technology Services India Pvt.Ltd Limited (WMGTS) interview questions and answers]]></category>
		<category><![CDATA[Xoriant Solutions Pvt Ltd interview questions and answers]]></category>
		<category><![CDATA[Yodlee Infotech Pvt Ltd interview questions and answers]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=515</guid>

					<description><![CDATA[Answer : The Binary search tree is a node-based on the binary tree data structure...]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<h2 id="what-is-binary-search-tree" class="color-pink" style="text-align: justify;">What is binary search tree ?</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>The <a href="https://www.wikitechy.com/technology/category/data-structures/binary-search-tree/" target="_blank" rel="noopener">Binary search tree</a> is a node-based on the binary tree data structure has the following properties,
<ul>
<li>The left-side sub tree of a node contains only nodes with keys lesser than the node’s key.</li>
<li>The right-side sub tree of a node contains only nodes with keys greater than the node’s key.</li>
<li>The left-side and right-side subtree each must also be a binary search tree.</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="ImageContent" style="text-align: justify;">
<div class="hddn"><img decoding="async" class="img-responsive center-block aligncenter" src="https://cdn.wikitechy.com/interview-questions/data-structure/what-is-binary-search-tree.gif" alt="Binary Search Tree" /></div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="binary-search-tree-traversing" class="color-green">Binary Search Tree Traversing</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li><a href="https://www.wikitechy.com/technology/c-programming-tree-traversals-inorder-preorder-postorder/" target="_blank" rel="noopener">Pre-order</a> traversal.</li>
<li><a href="https://www.wikitechy.com/technology/java-programming-tree-traversals-inorder-preorder-postorder/" target="_blank" rel="noopener">Post-order</a> traversal.</li>
<li><a href="https://www.wikitechy.com/technology/python-programming-tree-traversals-inorder-preorder-postorder/" target="_blank" rel="noopener">In-order</a> traversal.</li>
</ul>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="pre-order-traversal" class="color-purple">Pre-order traversal</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>This traversal technique it may be traversal order is root-left-right.
<ul>
<li>Visit the node.</li>
<li>Call itself to traverse the node&#8217;s left subtree.</li>
<li>Call itself to traverse the node&#8217;s right subtree.</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="TextHeading">
<div class="hddn">
<h2 id="algoithm" class="color-green" style="text-align: justify;">Algoithm</h2>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-markdown code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-markdown code-embed-code">preOrder (t)<br/>     {<br/>       if (t is not empty)<br/>        {<br/>              access the root element of t;<br/>              preOrder (leftTree (t));<br/>              preOrder (rightTree (t));<br/>       } // if<br/>    } // preOrder traversal</code></pre> </div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="post-order-traversal" class="color-purple">Post-order traversal</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>This traversal technique the traversal order is left-right-root.
<ul>
<li>Call itself to traverse the node&#8217;s left subtree.</li>
<li>Call itself to traverse the node&#8217;s right subtree.</li>
<li>Visit the node.</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="TextHeading">
<div class="hddn">
<h2 id="algoithm-2" class="color-green" style="text-align: justify;">Algoithm</h2>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-markdown code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-markdown code-embed-code">postOrder (t)<br/> { <br/>   if (t is not empty) <br/>    { <br/>       postOrder(leftTree(t));<br/>       postOrder(rightTree(t)); <br/>       access the root element of t;<br/>    } // if <br/>} // postOrder traversal</code></pre> </div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="n-order-traversal" class="color-purple">n-order traversal</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>An <a href="https://www.wikitechy.com/technology/python-programming-inorder-predecessor-successor-given-key-bst/" target="_blank" rel="noopener">in-order</a> traversal of a binary search tree will cause all the nodes to be visited in ascending order, based on their key values. If you want to create a sorted list of the data in a binary tree, this is one way to do it.
<ul>
<li>Call itself to traverse the node&#8217;s left subtree.</li>
<li>Visit the node.</li>
<li>Call itself to traverse the node&#8217;s right subtree</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="TextHeading">
<div class="hddn">
<h2 id="algoithm-3" class="color-green" style="text-align: justify;">Algoithm</h2>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-markdown code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-markdown code-embed-code">private void inOrder(node localRoot) <br/>{ <br/>  if(localRoot != null) <br/>   {<br/>      inOrder(localRoot.leftChild);<br/>      localRoot.displayNode(); <br/>      inOrder(localRoot.rightChild); <br/>   }<br/> }</code></pre> </div>
<p style="text-align: justify;"><img decoding="async" class="img-responsive center-block aligncenter" src="https://cdn.wikitechy.com/interview-questions/data-structure/binary-tree-traversing.png" alt="Binary Tree Traversing" /></p>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="advantages" class="color-blue">Advantages</h2>
</div>
</div>
<div class="Content" style="text-align: justify;">
<div class="hddn">
<ul>
<li>Binary Search Tree is fast in insertion and deletion etc when balanced.</li>
<li>It is very efficient and its code is easier than Linklists.</li>
</ul>
</div>
</div>
<div class="TextHeading" style="text-align: justify;">
<div class="hddn">
<h2 id="disadvantages" class="color-blue">Disadvantages</h2>
</div>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li style="text-align: justify;">The main disadvantage is that we should always implement a balanced binary search tree &#8211; AVL tree, Red-Black tree, Splay tree. Otherwise the cost of operations may not be logarithmic and degenerate into a linear search on an array.</li>
<li style="text-align: justify;">Shape of the tree depends upon order of insertion and it can be degenerated.</li>
<li style="text-align: justify;">Searching takes long time.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/data-structure/what-is-binary-search-tree/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
