**Data structure interview question**:What is mean by d-queue?

**Answer**: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

**Data structure interview question**:Example of linear and non-linear data structures?

**Answer**: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.

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.

**Data structure interview question**:How to find the number of possible tree in the given tree.

**Answer**: The number of possible tree = (2 power of n) - n.

For example:A tree contain three node.So if n=3,the possible number of trees = 8 - 3 = 5.

**Data structure interview questio**n:What is hashing

**Answer**: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 are retrieved using same hash function.

**Data structure interview question**:What is almost complete binary tree?

**Answer**: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.

**Data structure interview question**:Classify the Hashing Functions based on the various methods by which the key value is found?

**Answer:**

Direct method,

Subtraction method,

Modulo-Division method,

Digit-Extraction method,

Mid-Square method,

Folding method,

Pseudo-random method.

**Data structure interview question**:What is almost complete binary tree?

**Answer**: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.

**Data structure interview question**::What is AVL tree?

**Answer**:Avl tree is self binary tree in which balancing factor lie between the -1 to 1.It is also known as self balancing tree.

## No comments:

## Post a Comment