<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Data structure interview questions and answers with tips</title><description>Site contains programming interview questions on data structures in topics like trees,stacks,queues,linked lists that will provide you several job interview skills.</description><managingEditor>noreply@blogger.com (Anonymous)</managingEditor><pubDate>Thu, 24 Oct 2024 01:24:27 -0700</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">13</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://data-structure-definition.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>Site contains data structures interview questions and answers asked in interviews and these data structure interview questions will be the most important tips before attending interviews</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>Data structure interview questions Part 13</title><link>http://data-structure-definition.blogspot.com/2012/01/data-structure-interview-questions-part.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Thu, 26 Jan 2012 07:59:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-6496700228863519693</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b style="font-family: Verdana,sans-serif;"&gt;&lt;i&gt;Q&lt;/i&gt;: What's the major distinction in between Storage structure and file structure&lt;/b&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;b style="font-family: Verdana,sans-serif;"&gt;&amp;nbsp;and how?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;b style="font-family: Verdana,sans-serif;"&gt;&lt;i&gt;A:&lt;/i&gt;&lt;/b&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt; The expression of an specific data structure inside memory of a computer system is termed storage structure in contrast to a storage structure expression in auxiliary memory is normally known as a file structure.&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;b style="font-family: Verdana,sans-serif;"&gt;&lt;i&gt;Q&lt;/i&gt;: Explain whether Linked List is actually linear or Non-linear data structure?&lt;/b&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;i style="font-family: Verdana,sans-serif;"&gt;&lt;b&gt;A&lt;/b&gt;&lt;/i&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;: Link list is definitely obviously linear data structure simply because each and every element (NODE) acquiring specific place and as well each and every component has got its unique successor in addition to predecessor. furthermore, linear collection of data objects referred to as nodes and also the linear order is provided by means of pointers. Every node can be separated into two parts. First part includes information of the element and another part includes the address of the subsequent node in the list.&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Q: Explain simulation?&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;&amp;nbsp;A: Simulation is the procedure for developing an fuzy model from a real situation so as to understand the effects of modifications and the effect of introducing a variety of techniques on the situation. It is a rendering with real life system by another system, which represents the important characteristics of real system and allows experiments on it.&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;b style="font-family: Verdana,sans-serif;"&gt;&lt;i&gt;Q&lt;/i&gt;: Does the minimum spanning tree of the graph provide the shortest distance between any two given nodes?&lt;/b&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;i style="font-family: Verdana,sans-serif;"&gt;&lt;b&gt;A&lt;/b&gt;&lt;/i&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;: Minimal spanning tree ensures that the total weight of the tree is actually kept at its minimum but it really would not signify the distance between any two nodes involved in the minimum-spanning tree is actually minimum.&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;b style="font-family: Verdana,sans-serif;"&gt;&lt;i&gt;Q&lt;/i&gt;: In an AVL tree, at exactly what situation the balancing will be done?&lt;/b&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;b style="font-family: Verdana,sans-serif;"&gt;&lt;i&gt;A&lt;/i&gt;:&lt;/b&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt; If the pivotal value (or the Height factor) is above 1 or less than 1. If the balance factor of any node is other than 0 or 1 or -1 then balancing is completed. The balancing factor will be height. The variation in height of the right subtree along with right subtree need to be +1, -1 or 0&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;b style="font-family: Verdana,sans-serif;"&gt;&lt;i&gt;Q:&lt;/i&gt; What is the significant difference between ARRAY and STACK?&lt;/b&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;b style="font-family: Verdana,sans-serif;"&gt;&lt;i&gt;A&lt;/i&gt;:&lt;/b&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt; Stack ensues LIFO. Thus the item that is certainly first entered would be the last removed. In array the items could be entered or removed in any order. Basically each and every member access is done making use of index and no strict order is to be followed here to remove a particular element. Array could be multi dimensional or one dimensional but stack really should be one-dimensional.&lt;/span&gt;&lt;/span&gt;&lt;br style="font-family: Verdana,sans-serif;" /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Verdana,sans-serif;"&gt;Size of array is fixed, while stack may be grow or shrink. We can say stack is actually dynamic data structure.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description></item><item><title>Data structure interview questions Part 12</title><link>http://data-structure-definition.blogspot.com/2010/10/data-structure-interview-questions-and.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Sat, 16 Oct 2010 13:27:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-5392080121890294222</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;:What is mean by d-queue?&lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;:D-queue stands for double ended queue. It is a abstract data structure that implements a queue for which elements can be added to front or rear and the elements can be removed from the rear or front. It is also called head-tail linked list&lt;div&gt;&lt;br /&gt;
&lt;b&gt;Data structure interview question&lt;/b&gt;:Example of linear and non-linear data structures? &lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;:The data structure is said to be a Linear data structure if its elements are in sequence and form a linear list.Ex. Arrays, Stacks, Queues,Linked Lists.&lt;br /&gt;
If the elements of data structure do not form a sequence or a linear list then that type of data structure is called as Non-Linear data structure.Ex. Trees, BST(Binary Search Trees) etc.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Data structure interview question&lt;/b&gt;:How to find the number of possible tree in the given tree.&lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;: The number of possible tree = (2 power of n) - n.&lt;br /&gt;
For example:A tree contain three node.So if n=3,the possible number of trees = 8 - 3 = 5.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Data structure interview questio&lt;/b&gt;n:What is hashing&lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;:Hashing is a way retrieving records from memory in faster way. Record is inserted into memory by using hash function(division, midsqure,folding,digit analysis)and also records&amp;nbsp;are retrieved using same hash function.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Data structure interview question&lt;/b&gt;:What is almost complete binary tree?&lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;:An almost complete binary tree is a tree in which each nodethat has a right child also has a left child. Having a left child does not require a node to have a right child. Stated alternately, an almost complete binary tree is a tree where for a right child, there is always a left child, but for a left child there may not be a right child.The number of nodes in a binary tree can be found using this formula: n = 2^h Where n is the amount of nodes in the tree, and h is the height of the tree.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;b&gt;Data structure interview question&lt;/b&gt;:Classify the Hashing Functions based on the various methods by which the key value is found?&lt;br /&gt;
&lt;b&gt;Answer:&lt;/b&gt;&lt;br /&gt;
Direct method, &lt;br /&gt;
Subtraction method, &lt;br /&gt;
Modulo-Division method, &lt;br /&gt;
Digit-Extraction method, &lt;br /&gt;
Mid-Square method, &lt;br /&gt;
Folding method, &lt;br /&gt;
Pseudo-random method.  &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Data structure interview question&lt;/b&gt;:What is almost complete binary tree? &lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;:An almost complete binary tree is a tree in which each node that has a right child also has a left child. Having a left child does not require a node to have a right child. Stated alternately, an almost complete binary tree is a tree where for a right child, there is always a left child, but for a left child there may not be a right child.The number of nodes in a binary tree can be found using this formula: n = 2^h Where n is the amount of nodes in the tree, and h is the height of the tree.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Data structure interview question&lt;/b&gt;::What is AVL tree?&lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;:Avl tree is self binary tree in which balancing factor lie between the -1 to 1.It is also known as self balancing tree.&lt;/div&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Data structure interview questions Part 11</title><link>http://data-structure-definition.blogspot.com/2010/05/data-structure-interview-questions-and.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Sat, 15 May 2010 00:50:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-4075454121555915456</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;:What do you mean by: Syntax Error, Logical Error, Run time Error? &lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Syntax Error&lt;/b&gt;-Syntax Error is due to lack of knowledge in a specific language. It is due to somebody does not know how to use the features of a language.We can know the errors at the time of compilation.logical&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Error&lt;/b&gt;-It is due to the poor understanding of the requirement or problem.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Run time Error&lt;/b&gt;-The exceptions like divide a number by 0,overflow and underflow comes under this.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Data structure interview question&lt;/b&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;:What is the maximum total number of nodes in a tree that has N levels? Note that the root is level (zero).&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer:&lt;/b&gt;2^(N+1)-1..&lt;br /&gt;
&lt;br /&gt;
if N=0; it is 2-1=1,1 is the max no of node in the tree &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
if N=1; it is 4-1=3, 3 is the max no of nodes in the tree&lt;br /&gt;
if N=2; it is 8-1=7, 7 is the max.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Data structure interview question&lt;/b&gt;:Explain about the types of linked lists?&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;:Their are three linked lists&lt;/span&gt;&lt;span style="font-size: small;"&gt;1)linear or simple linked lists&lt;/span&gt;&lt;span style="font-size: small;"&gt;2)doubly linked lists&lt;/span&gt;&lt;span style="font-size: small;"&gt;3)circular linked lists&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;simple linked list &lt;/b&gt;&lt;b&gt;:&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;This contains a node which has two parts, see that a node is a STRUCTURE.one is data and other one is a pointer which is called self reference pointers, so we must make it to point to the next location of second node created dynamically.&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;double linked lists &lt;/b&gt;&lt;b&gt;:&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;A node will consists of previous node address , a data &amp;amp; next node address which can move backwards to the very first address.&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;circular linked list&lt;/b&gt; &lt;b&gt;:&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;Here we will have the node consists of same thing but default when it finishes the last node and come to the first node.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;:What are the parts of root node? &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;:A root node contains data part and has link part. i.e links to its child. If it is binary tree it has two links i.e left child and right child.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question:&lt;/b&gt;How will inorder, preorder and postorder traversals print&lt;/span&gt;&lt;span style="font-size: small;"&gt;the elements of a tree?&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;:&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;void&lt;/span&gt;&lt;span style="font-size: small;"&gt;inorder(node * tree)&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: small;"&gt;if(tree!=NULL)&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: small;"&gt;{&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;inorder(tree-&amp;gt;leftchild);&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;printf("%d",tree-&amp;gt;data);&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;inorder(tree-&amp;gt;rightchild);&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: small;"&gt;}&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;return;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;}&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;void postorder(node * tree)&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;{&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;if(tree!=NULL)&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;{&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;postorder(tree-&amp;gt;leftchild);&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;postorder(tree-&amp;gt;rightchild);&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;printf("%d&lt;/span&gt;&lt;span style="font-size: small;"&gt;",tree-&amp;gt;data);&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&amp;nbsp;}&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;return;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;}&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;void preorder(node * tree)&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: small;"&gt;{&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;if(tree!=NULL)&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;{&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;printf("%d",tree-&amp;gt;data);&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;preorder(tree-&amp;gt;leftchild);&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;preorder(tree-&amp;gt;rightchild);&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;}&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;else&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;return;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;/div&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Data structure interview questions Part 10</title><link>http://data-structure-definition.blogspot.com/2010/02/data-structure-definition-part-10.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Sun, 7 Feb 2010 16:44:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-2939504817785621562</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;:Create an singly linked lists and reverse the lists by interchanging the links and not the data?&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;struct node{ int data;&lt;br /&gt;
node * next;&lt;br /&gt;
};&lt;br /&gt;
node *pt1,*pt2=NULL:&lt;br /&gt;
while(root!=NULL)&lt;br /&gt;
{&lt;br /&gt;
pt1=root;&lt;br /&gt;
root=root-&amp;gt;next;&lt;br /&gt;
pt1-&amp;gt;next=pt2;&lt;br /&gt;
pt2=pt1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt;:What is B+ tree?&amp;nbsp;&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:A B+ tree is a type of tree which represents sorted data in a way that allows for efficient insertion, retrieval and removal of records, each of which is identified by a key. It is a dynamic, multilevel index, with maximum and minimum bounds on the number of keys in each index segment (usually called a 'block' or 'node'). In a B+ tree, in contrast to a B-tree, all records are stored at the lowest level of the tree; only keys are stored in interior blocks.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The primary value of a B+ tree is in storing data for efficient retrieval in a block-oriented storage context. Given a storage system with a block size of b, a B+ tree which stores a number of keys equal to a multiple of b will be very efficient when compared to a binary search tree (the corresponding data structure for non-block-oriented storage&lt;br /&gt;
contexts).&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:Binary search is faster because we traverse the elements by using the policy of Divide and Conquer. we compare the key element with the approximately center element, if it is smaller than it search is applied in the smaller elements only otherwise the search is applied in the&amp;nbsp; larger set of elements. its complexity is as we all know is log n as compared to the sequential one whose complexity is n.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:Parenthesis are never needed in prefix or postfix expressions. Why?&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:Basically Parenthesis indicate the operations which&amp;nbsp; need to be carried out first ie according to the BODMAS rule..SO in case of postfix or prefix expression they are actualy conversions of the orginal standard&amp;nbsp; equation.Where the brackets have already been taken into consideration,,,and the formed prefix/postfix&amp;nbsp; expression is the correct order of expansion of a given&amp;nbsp; mathematical statement.&lt;/span&gt;   &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:How can one find a cycle in the linked list? IF found how to recognize the cycle and delete that cycle? &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: find_cycle(Node* head){&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;   Node* ptr1 = head;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;   Node* ptr2 = head;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;   while(ptr1 != NULL &amp;amp;&amp;amp; ptr2 != NULL &amp;amp;&amp;amp; ptr2-&amp;gt;next != NULL){&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;      if(ptr1 == ptr2){&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;          printf("\nClycle present in thr LinkList\n");&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;          return true;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;      } &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;      ptr1 = prt1-&amp;gt;next;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;      ptr2 = ptr2-&amp;gt;next-&amp;gt;next;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;   }&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;   return false;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;/div&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total></item><item><title>Data structure interview questions Part 9</title><link>http://data-structure-definition.blogspot.com/2010/01/data-structure-definition-part-9.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Thu, 7 Jan 2010 16:48:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-1912733903255257389</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;b&gt;Data structure interview question:&lt;/b&gt;Stack can be described as a pointer. Explain?&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;b&gt;Answer&lt;/b&gt;:Because stack will contain a head pointer which will always point to the top of the Stack.All Stack Operations are done using Head Pointer. Hence Stack ca be Described as a Pointer&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Data structure  interview question&lt;/b&gt;&lt;b&gt;:&lt;/b&gt;What do you mean by Base case, Recursive case, Binding Time, Run-Time Stack and Tail Recursion?&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;b&gt;Answer&lt;/b&gt;:These terms are found in Recursion.1.Base Case:it is the case in recursion where the answer is known,or we can say the termination condition for a recursion to unwind back.For example to find Factorial of num using recursion:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
int Fact(int num){&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;if(num==1 || num==0)//base case&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;return 1;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;else                // recursive case: &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;return num*Fact(num-1);&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;2.Recursive case:It is the case whcih brings us to the &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;closer answer.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
Run Time Stack:It is a system stack us to save the frame stack of a function every recursion or every call.This frame stack consists of the return address,local variables and return value if any.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
Tail Recursion:The case where the function consist of single recursive call and it is the last statement to be executed.A tail Recursion can be replace by iteration. The above funtion consists of tail recursion case.where as the below function does not.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;void binary(int start,int end,int el){&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;int mid;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;if(end&amp;gt;start){&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;mid=(start+end)/2;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;if(el==ar[mid])&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;return mid;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;else{&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;if(el&amp;gt;ar[mid])&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;binary(mid+1,end,ele);&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;binary(start,mid-11,ele);&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Data structure  interview question&lt;/b&gt;&lt;b&gt;:&lt;/b&gt;What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm?&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;b&gt;Answer&lt;/b&gt;:Stack&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;b&gt;Data structure  interview question&lt;/b&gt;&lt;b&gt;:&lt;/b&gt;what is binary tree?&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;b&gt;:&lt;/b&gt;Binary tree is a tree which has maximum no. of childrens either 0 or 1 or 2. i.e., there is at the most 2 branches in every node.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Data structure interview questions Part 8</title><link>http://data-structure-definition.blogspot.com/2009/09/data-structure-defination-part-8.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Sun, 13 Sep 2009 10:00:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-3025085960336287055</guid><description>&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;:Convert the given graph with weighted edges to minimal spanning tree &lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBEbfFLSUHg_3m66TSx3nYWLC5vy1ux7is2Xq1VNbGfQa2n5EA-qRElJzf5zp6I3-M2rkk2rmg0MY9qbvv6Fw4Vf6R6ku2kEcD_ftdPuGdaOiKC-XXJugp6qhiAYluyG40XzXWq2VDdbkI/s1600-h/data+8.bmp"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBEbfFLSUHg_3m66TSx3nYWLC5vy1ux7is2Xq1VNbGfQa2n5EA-qRElJzf5zp6I3-M2rkk2rmg0MY9qbvv6Fw4Vf6R6ku2kEcD_ftdPuGdaOiKC-XXJugp6qhiAYluyG40XzXWq2VDdbkI/s320/data+8.bmp" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;:The equivalent minimal spanning tree is: &lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglyLaIf06SjkVlVnglAm8ZU6-PhD2P0RNRiiLpG_SELmPMExU98j3st0n6bgRitZ_9pmrnpLEUaYHybqLKevRSFoT5OeajVvT-xCwNJNtJndcaNLIXe0XbCqdjN9EtxLxojStfObYDbU8J/s1600-h/data+9.bmp"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglyLaIf06SjkVlVnglAm8ZU6-PhD2P0RNRiiLpG_SELmPMExU98j3st0n6bgRitZ_9pmrnpLEUaYHybqLKevRSFoT5OeajVvT-xCwNJNtJndcaNLIXe0XbCqdjN9EtxLxojStfObYDbU8J/s320/data+9.bmp" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: &lt;b&gt;Draw a binary Tree for the expression&lt;/b&gt; : &lt;br /&gt;
A * B - (C + D) * (P /Q)&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt;&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivOn8l-Q9op3QsljyS7eBsSYRGaanK4kIupcaLm-Dwl5ysF5Zb4ByNYpu1-g_-SxbU7DQho-g17coFIQMkDBqKiVo9mfeLBKY3uTYqfGE4_TY_zGk_ULz12L8gAKmpsL5K_tXJbghOXhoL/s1600-h/data+7.bmp"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivOn8l-Q9op3QsljyS7eBsSYRGaanK4kIupcaLm-Dwl5ysF5Zb4ByNYpu1-g_-SxbU7DQho-g17coFIQMkDBqKiVo9mfeLBKY3uTYqfGE4_TY_zGk_ULz12L8gAKmpsL5K_tXJbghOXhoL/s320/data+7.bmp" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: For the following COBOL code, draw the Binary tree? &lt;br /&gt;
01 STUDENT_REC. &lt;br /&gt;
02 NAME. &lt;br /&gt;
03 FIRST_NAME PIC X(10). &lt;br /&gt;
03 LAST_NAME PIC X(10). &lt;br /&gt;
02 YEAR_OF_STUDY. &lt;br /&gt;
03 FIRST_SEM PIC XX. 03 SECOND_SEM PIC XX&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt;&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QyTArX378sxWrQHZI-P_aUeT-rxel9S2vo05_eA7madNAJcXpWuPHCLzVE7LgmBgoOQScDwBOLQO5gD8n-Y3eK16M91EqjMf6lLtst1rbZXv8gbJ0VehUw8w9m5tPa09WoKV82HJD0uS/s1600-h/data+10.bmp"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QyTArX378sxWrQHZI-P_aUeT-rxel9S2vo05_eA7madNAJcXpWuPHCLzVE7LgmBgoOQScDwBOLQO5gD8n-Y3eK16M91EqjMf6lLtst1rbZXv8gbJ0VehUw8w9m5tPa09WoKV82HJD0uS/s400/data+10.bmp" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBEbfFLSUHg_3m66TSx3nYWLC5vy1ux7is2Xq1VNbGfQa2n5EA-qRElJzf5zp6I3-M2rkk2rmg0MY9qbvv6Fw4Vf6R6ku2kEcD_ftdPuGdaOiKC-XXJugp6qhiAYluyG40XzXWq2VDdbkI/s72-c/data+8.bmp" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Data structure interview questions Part 7</title><link>http://data-structure-definition.blogspot.com/2009/09/data-structure-defination-part-7.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 1 Sep 2009 09:50:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-7197427419492310908</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question:&lt;/b&gt;Of the following tree structure, which is, efficient considering space and time complexities? &lt;br /&gt;
(a) Incomplete Binary Tree &lt;br /&gt;
(b) Complete Binary Tree &lt;br /&gt;
(c) Full Binary Tree &lt;br /&gt;
(d) Complete Binary Tree. &lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;:&lt;br /&gt;
By the method of elimination: &lt;br /&gt;
Full binary tree loses its nature when operations of insertions and deletions are done. For incomplete binary trees, extra storage is required and overhead of NULL node checking takes place. So complete binary tree is the better one since the property of complete binary tree is maintained even after operations like additions and deletions are done on it. &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:&lt;b&gt;What is a spanning Tree?&lt;/b&gt; &lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized. &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes? &lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt;No. Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But it doesn’t mean that the distance between any two nodes involved in the minimum-spanning tree is minimum.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;: Which is the simplest file structure? &lt;br /&gt;
(a) Sequential &lt;br /&gt;
(b) Indexed &lt;br /&gt;
(c) Random&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: Sequential &lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:Whether Linked List is linear or Non-linear data structure? &lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:According to Access strategies Linked list is a linear one. &lt;br /&gt;
According to Storage Linked List is a Non-linear one.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Data structure interview questions Part 6</title><link>http://data-structure-definition.blogspot.com/2009/09/data-structure-defination-part-6.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Sat, 1 Aug 2009 09:46:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-8289429948763756706</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; margin-left: 0.25in; text-align: justify; text-indent: -0.25in;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;|:&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;&lt;span style="font-size: small;"&gt;Sort the given values using Quick Sort?&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span lang="EN-AU"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 0px; margin-right: 0px; text-align: left;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;65&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;70&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;85&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;60&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;55&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;45&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="border-collapse: collapse;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span lang="EN-AU"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="font-size: small;"&gt;Sorting takes place from the pivot value, which is the first value of the given elements, this is marked bold. The values at the left pointer and right pointer are indicated using &lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;and &lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;respectively.&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 0px; margin-right: 0px; text-align: left;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;65&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;70&lt;sup&gt;L&lt;/sup&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;85&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;60&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;55&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;45&lt;sup&gt;R&lt;/sup&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;span lang="EN-AU"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-size: small;"&gt;Since pivot is not yet changed the same process is continued after interchanging the values at &lt;/span&gt;&lt;span style="font-size: small;"&gt;and &lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;positions.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 0px; margin-right: 0px; text-align: left;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;65&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;45&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;75&lt;sup&gt; L&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;80&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;85&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;60&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;55&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;50&lt;sup&gt; R&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;70&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-size: small;"&gt;&lt;span lang="EN-AU"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 0px; margin-right: 0px; text-align: left;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;65&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;45&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;50&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;80&lt;sup&gt; L&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;85&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;60&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;55&lt;sup&gt; R&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;75&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;70&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 0px; margin-right: 0px; text-align: left;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;65&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;45&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;50&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;55&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;85&lt;sup&gt; L&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;60&lt;sup&gt; R&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;80&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;75&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;70&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 0px; margin-right: 0px; text-align: left;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;65&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;45&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;50&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;55&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;60&lt;sup&gt; R&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;85&lt;sup&gt; L&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;80&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;75&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;70&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span lang="EN-AU"&gt;&lt;span style="font-size: small;"&gt;When the L and R pointers cross each other the pivot value is interchanged with the value at right pointer. If the pivot is changed it means that the pivot has occupied its original position in the sorted order (shown in bold italics) and hence two different arrays are formed, one from start of the original array to the pivot position-1 and the other from pivot position+1 to end.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 0px; margin-right: 0px; text-align: left;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span lang="EN-AU"&gt;&lt;span style="font-weight: normal;"&gt;6&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;sup&gt;&lt;span lang="EN-AU"&gt; L&lt;/span&gt;&lt;/sup&gt;&lt;b&gt;&lt;span lang="EN-AU"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;45&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;50&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;55&lt;sup&gt; R&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;65&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;85&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;sup&gt;&lt;span lang="EN-AU"&gt; L&lt;/span&gt;&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;80&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;75&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;70&lt;sup&gt; R&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 0px; margin-right: 0px; text-align: left;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;55&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;sup&gt;&lt;span lang="EN-AU"&gt; L&lt;/span&gt;&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;45&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;50&lt;sup&gt; R&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;60&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;65&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;70&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;sup&gt;&lt;span lang="EN-AU"&gt; R&lt;/span&gt;&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;80&lt;sup&gt; L&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;75&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;85&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 0px; margin-right: 0px; text-align: left;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;50&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;sup&gt;&lt;span lang="EN-AU"&gt; L&lt;/span&gt;&lt;/sup&gt;&lt;b&gt;&lt;span lang="EN-AU"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;45&lt;sup&gt; R&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;55&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;60&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;65&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;70&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;80&lt;sup&gt; L&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;75&lt;sup&gt; R&lt;/sup&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;85&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span lang="EN-AU"&gt;&lt;span style="font-size: small;"&gt;In the next pass we get the sorted form of the array.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 0px; margin-right: 0px; text-align: left;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;45&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;55&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;60&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;65&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;70&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;75&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;&lt;span lang="EN-AU"&gt;85&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: small;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Data structure interview questions Part 5</title><link>http://data-structure-definition.blogspot.com/2009/09/data-structure-defination-part-5.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Wed, 1 Jul 2009 09:32:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-4722998607997100065</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;: For the given graph, draw the DFS and BFS? &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;Answer:&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHOgLrF9jUv3TPnjT1x0cpFQPTAjN_HRxBpJTKcQQQ-TDLKKqduUBYHTfNq4EMBxqL4RvhvfJ-w5eJUP8Wd4_wESK5-JGq19bKbdKo0l3EG8ZbC1gw4mIFhgahD4xRP074-G8vpN3ywTe3/s1600-h/data+5.bmp"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHOgLrF9jUv3TPnjT1x0cpFQPTAjN_HRxBpJTKcQQQ-TDLKKqduUBYHTfNq4EMBxqL4RvhvfJ-w5eJUP8Wd4_wESK5-JGq19bKbdKo0l3EG8ZbC1gw4mIFhgahD4xRP074-G8vpN3ywTe3/s320/data+5.bmp" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Ø BFS: A X G H P E M Y J &lt;br /&gt;
Ø DFS: A X H P E Y M J G &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: Classify the Hashing Functions based on the various methods by which the key value is found. &lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:&lt;br /&gt;
Ø Direct method, &lt;br /&gt;
Ø Subtraction method, &lt;br /&gt;
Ø Modulo-Division method, &lt;br /&gt;
Ø Digit-Extraction method, &lt;br /&gt;
Ø Mid-Square method, &lt;br /&gt;
Ø Folding method, &lt;br /&gt;
Ø Pseudo-random method. &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:What are the types of Collision Resolution Techniques and the methods used in each of the type? &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt;&lt;br /&gt;
Ø Open addressing (closed hashing), &lt;br /&gt;
The methods used include: &lt;br /&gt;
Overflow block, &lt;br /&gt;
Ø Closed addressing (open hashing) &lt;br /&gt;
&lt;br /&gt;
The methods used include: &lt;br /&gt;
Linked list, &lt;br /&gt;
Binary tree… &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: In RDBMS, what is the efficient data structure used in the internal storage representation? &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching easier. This corresponds to the records that shall be stored in leaf nodes. &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: Draw the B-tree of order 3 created by inserting the following data arriving in sequence – 92 24 6 7 11 8 22 4 5 16 19 20 78&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt;&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSy_KRqkNJgdzRl5boGVtghyYp0X-P1QQrY9fkLhovLXsLNnFCZO6KmN4ov0v-leaj8zMkE-px4Pba9J-RW3jK55COH5OMeFM2uOfOezE_47Ico3qhin4AU0GrxvlWZAesMIS2rcglbLn6/s1600-h/data+6.bmp"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSy_KRqkNJgdzRl5boGVtghyYp0X-P1QQrY9fkLhovLXsLNnFCZO6KmN4ov0v-leaj8zMkE-px4Pba9J-RW3jK55COH5OMeFM2uOfOezE_47Ico3qhin4AU0GrxvlWZAesMIS2rcglbLn6/s400/data+6.bmp" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHOgLrF9jUv3TPnjT1x0cpFQPTAjN_HRxBpJTKcQQQ-TDLKKqduUBYHTfNq4EMBxqL4RvhvfJ-w5eJUP8Wd4_wESK5-JGq19bKbdKo0l3EG8ZbC1gw4mIFhgahD4xRP074-G8vpN3ywTe3/s72-c/data+5.bmp" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Data structure interview questions Part 4</title><link>http://data-structure-definition.blogspot.com/2009/09/data-structure-defination-part-4.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Mon, 1 Jun 2009 09:21:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-4521665383916899633</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question:&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;What is the bucket size, when the overlapping and collision occur at same time?&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer:&lt;/b&gt;One. If there is only one entry possible in the bucket, when the collision occurs, there is no way to accommodate the colliding value. This results in the overlapping of values. &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure  interview question&lt;/b&gt;&lt;b&gt;: T&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;raverse the given tree using Inorder, Preorder and Postorder traversals.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOMUvuSeCCdrQ-fwxSNuCqZuKDBtNxao6zUK3_RJy5ChhIQ2yWCaUtDhN8XwL_yIjKLoI7kIjTSQQzXteF1tx-Bwc1cvTk8m2NFXbZSTumxe-t3q5htXEAQhLss-JXMP6PeO8ioL3Oupzb/s1600-h/data+struc+3.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOMUvuSeCCdrQ-fwxSNuCqZuKDBtNxao6zUK3_RJy5ChhIQ2yWCaUtDhN8XwL_yIjKLoI7kIjTSQQzXteF1tx-Bwc1cvTk8m2NFXbZSTumxe-t3q5htXEAQhLss-JXMP6PeO8ioL3Oupzb/s320/data+struc+3.bmp" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;Ø Inorder : D H B E A F C I G J &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;Ø Preorder: A B D H E C F G I J &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;Ø Postorder: H D E B F I J G C A &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question:&lt;/b&gt;There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a full binary tree? &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;:15.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;In general: &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;There are 2n-1 nodes in a full binary tree. &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;By the method of elimination: &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;Full binary trees contain odd number of nodes. So there cannot be full binary trees with 8 or 14 nodes, so rejected. With 13 nodes you can form a complete binary tree but not a full binary tree. So the correct answer is 15. &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;Note:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;Full and Complete binary trees are different. All full binary trees are complete binary trees but not vice versa. &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure  interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;: &lt;/b&gt;In the given binary tree, using array you can store the node 4 at which location? &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;:Left: 2i &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;Right:2i+1 &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;i=location&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-size: small;"&gt;At location&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="font-size: small;"&gt;6&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji3MJSI6vITFrZeSLf8FWBX2UVLvmPJxkJ-dw2CTvJ-cWbJH8mAxuma8VLDVu_Nmg2J-F-DwkEbn1aaOHnQeKpGgQdH3Vseu4ooGfe5UEXF34RIdSp0svSg88xjfKkhvTmNvQHdJXjzGgq/s1600-h/data+struc+4.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji3MJSI6vITFrZeSLf8FWBX2UVLvmPJxkJ-dw2CTvJ-cWbJH8mAxuma8VLDVu_Nmg2J-F-DwkEbn1aaOHnQeKpGgQdH3Vseu4ooGfe5UEXF34RIdSp0svSg88xjfKkhvTmNvQHdJXjzGgq/s320/data+struc+4.bmp" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: medium none; margin-left: 81.9pt;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;1&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;2&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;3&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;-&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;-&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;4&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;-&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;-&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;5&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;span lang="EN-AU"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin-left: 81.9pt;"&gt;&lt;tbody&gt;
&lt;tr&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;Root&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;LC1&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;RC1&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;LC2&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;RC2&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;LC3&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;RC3&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;LC4&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 0.5in;" valign="top" width="48"&gt;&lt;div align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;RC4&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span lang="EN-AU" style="font-size: small;"&gt;where LCn means Left Child of node n and RCn means Right Child&amp;nbsp; of node n.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOMUvuSeCCdrQ-fwxSNuCqZuKDBtNxao6zUK3_RJy5ChhIQ2yWCaUtDhN8XwL_yIjKLoI7kIjTSQQzXteF1tx-Bwc1cvTk8m2NFXbZSTumxe-t3q5htXEAQhLss-JXMP6PeO8ioL3Oupzb/s72-c/data+struc+3.bmp" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Data structure interview questions Part 3</title><link>http://data-structure-definition.blogspot.com/2009/09/data-structure-defination-part-3.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Fri, 1 May 2009 08:57:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-6678007300145366727</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question:&lt;/b&gt; How many different trees are possible with 10 nodes ? &lt;br /&gt;
&lt;b&gt;Answer:&lt;/b&gt;1014 &lt;br /&gt;
For example, consider a tree with 3 nodes(n=3), it will have the maximum combination of 5 different (ie, 23 - 3 = 5) trees. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCf08oIEuodgEvVljY2F6tJkwGa6HRIHRRluBuEG8sOzcajWulkN2NQJ6Gk4JbZKlmODrrJprtq_rucuAtjM8qcuLvzMI3dbefF-4xa4cItbdktWeIylg41L9AtIsoiSkhmdqkXf9PWYa8/s1600-h/data+sruc+2.bmp"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCf08oIEuodgEvVljY2F6tJkwGa6HRIHRRluBuEG8sOzcajWulkN2NQJ6Gk4JbZKlmODrrJprtq_rucuAtjM8qcuLvzMI3dbefF-4xa4cItbdktWeIylg41L9AtIsoiSkhmdqkXf9PWYa8/s320/data+sruc+2.bmp" /&gt;&lt;/a&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;           i &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;                    ii &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;               iii &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;               iv&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                v &lt;br /&gt;
&lt;br /&gt;
In general: &lt;br /&gt;
If there are n nodes, there exist 2n-n different trees. &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt; List out few of the Application of tree data-structure? &lt;br /&gt;
&lt;b&gt;Answer:&lt;/b&gt;&lt;br /&gt;
Ø The manipulation of Arithmetic expression, &lt;br /&gt;
Ø Symbol Table construction, &lt;br /&gt;
Ø Syntax analysis. &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: List out few of the applications that make use of Multilinked Structures? &lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:Ø Sparse matrix, &lt;br /&gt;
Ø Index generation. &lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: &lt;b&gt;In tree construction which is the suitable efficient data structure? &lt;/b&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:(a) Array (b) Linked list (c) Stack (d) Queue (e) none &lt;br /&gt;
Answer:&lt;br /&gt;
(b) Linked list &lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt;What is the type of the algorithm used in solving the 8 Queens problem? &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt;Backtracking &lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:&lt;b&gt;I&lt;/b&gt;n an AVL tree, at what condition the balancing is to be done? &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:If the ‘pivotal value’ (or the ‘Height factor’) is greater than 1 or less than –1.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCf08oIEuodgEvVljY2F6tJkwGa6HRIHRRluBuEG8sOzcajWulkN2NQJ6Gk4JbZKlmODrrJprtq_rucuAtjM8qcuLvzMI3dbefF-4xa4cItbdktWeIylg41L9AtIsoiSkhmdqkXf9PWYa8/s72-c/data+sruc+2.bmp" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Data structure interview questions Part 2</title><link>http://data-structure-definition.blogspot.com/2009/09/data-structure-defination-part-2.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Wed, 1 Apr 2009 08:51:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-6188611575412136653</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question:&lt;/b&gt;What are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms?&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;:Polish and Reverse Polish notations. &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt; Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix and Postfix notations. &lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt;&lt;b&gt;Prefix Notation&lt;/b&gt;: ^ - * +ABC - DE + FG &lt;br /&gt;
&lt;b&gt;Postfix Notation&lt;/b&gt;: AB + C * DE - - FG + ^ &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:Sorting is not possible by using which of the following methods? &lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt;(a) Insertion &lt;br /&gt;
(b) Selection &lt;br /&gt;
(c) Exchange (bubble sort) &lt;br /&gt;
(d) Deletion &lt;br /&gt;
(d) Deletion. &lt;br /&gt;
Using insertion we can perform insertion sort, using selection we can perform selection sort, using exchange we can perform the bubble sort (and other similar sorting methods). But no sorting method can be done just using deletion. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Q&lt;/b&gt;:&lt;b&gt;Draw a binary tree with 20 nodes has 21 null branches&lt;/b&gt;? &lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;:Let us take a tree with 5 nodes (n=5) &lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOo0-J-iCils0kKLa2meOCbSgAJt6od62ixcPYsZtgFZDNG9jz8UG-mGTd_d9lb6BHnV_QJfgd5bz3Kk2DaOOfD4u6zeCXLhUe2A6nPOiuwa17LhMnFr-au89xTye-W-VJJ11e1_40aU6H/s1600-h/data+struc.bmp"&gt;&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOo0-J-iCils0kKLa2meOCbSgAJt6od62ixcPYsZtgFZDNG9jz8UG-mGTd_d9lb6BHnV_QJfgd5bz3Kk2DaOOfD4u6zeCXLhUe2A6nPOiuwa17LhMnFr-au89xTye-W-VJJ11e1_40aU6H/s320/data+struc.bmp" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
It will have only 6 (ie,5+1) null branches. In general, a binary tree with n nodes has exactly n+1 null nodes. &lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;:&lt;/b&gt; What are the methods available in storing sequential files ? &lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;:Ø Straight merging, &lt;br /&gt;
Ø Natural merging, &lt;br /&gt;
Ø Polyphase sort, &lt;br /&gt;
Ø Distribution of Initial runs.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOo0-J-iCils0kKLa2meOCbSgAJt6od62ixcPYsZtgFZDNG9jz8UG-mGTd_d9lb6BHnV_QJfgd5bz3Kk2DaOOfD4u6zeCXLhUe2A6nPOiuwa17LhMnFr-au89xTye-W-VJJ11e1_40aU6H/s72-c/data+struc.bmp" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Data structure interview questions Part 1</title><link>http://data-structure-definition.blogspot.com/2009/09/data-structure-defination-part-1.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Sun, 1 Mar 2009 08:43:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4776919684288815519.post-8064276883838575654</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: What is data structure&lt;b&gt;?&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;:A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:&lt;b&gt; &lt;/b&gt;List out the areas in which data structures are applied extensively?&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: Ø Compiler Design,&lt;br /&gt;
Ø Operating System,&lt;br /&gt;
Ø Database Management System,&lt;br /&gt;
Ø Statistical analysis package,&lt;br /&gt;
Ø Numerical Analysis,&lt;br /&gt;
Ø Graphics,&lt;br /&gt;
Ø Artificial Intelligence,&lt;br /&gt;
Ø Simulation&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;:What are the major data structures used in the following areas of RDBMS, Network data model &amp;amp; Hierarchical data model.&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: Ø RDBMS – Array (i.e. Array of structures)&lt;br /&gt;
Ø Network data model – Graph&lt;br /&gt;
Ø Hierarchical data model – Trees&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: &lt;b&gt;If you are using C language to implement the heterogeneous linked list, what pointer type will you use?&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;: The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: Minimum number of queues needed to implement the priority queue?&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: Two. One queue is used for actual storing of data and another for storing priorities.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: justify;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Data structure interview question&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;: What is the data structures used to perform recursion?&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Answer&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;: &lt;/b&gt;Stack. Because of its LIFO (Last In First Out) property it remembers its ‘caller’ so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used. &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item></channel></rss>