# Category Archives: Data Structures

## Data Structures | Binary Trees | Question 6

The maximum number of binary trees that can be formed with three unlabeled nodes is: (A) 1 (B) 5 (C) 4 (D) 3 Answer: (B)… Read More »

## Data Structures | Binary Trees | Question 15

In a complete k-ary tree, every internal node has exactly k children or no child. The number of leaves in such a tree with n… Read More »

## Data Structures | Binary Trees | Question 4

Level of a node is distance from root to that node. For example, level of root is 1 and levels of left and right children… Read More »

## Data Structures | Binary Trees | Question 3

What are the main applications of tree data structure? 1) Manipulate hierarchical data 2) Make information easy to search (see tree traversal). 3) Manipulate sorted… Read More »

## Data Structures | Tree Traversals | Question 3

The inorder and preorder traversal of a binary tree are d b e a f c g and a b d e c f g,… Read More »

## Data Structures | Tree Traversals | Question 2

What is common in three different types of traversals (Inorder, Preorder and Postorder)? (A) Root is visited before right subtree (B) Left subtree is always… Read More »

## Data Structures | Binary Trees | Question 15

If arity of operators is fixed, then which of the following notations can be used to parse expressions without parentheses? a) Infix Notation (Inorder traversal… Read More »

## Data Structures | Tree Traversals | Question 1

Following function is supposed to calculate the maximum depth or height of a Binary tree — the number of nodes along the longest path from… Read More »

## Data Structures | Binary Trees | Question 1

Which of the following is a true about Binary Trees (A) Every binary tree is either complete or full. (B) Every complete binary tree is… Read More »

## Data Structures | Queue | Question 2

Which one of the following is an application of Queue Data Structure? (A) When a resource is shared among multiple consumers. (B) When data is… Read More »

## Data Structures | Linked List | Question 3

Consider the following function that takes reference to head of a Doubly Linked List as parameter. Assume that a node of doubly linked list has… Read More »

## Data Structures | Linked List | Question 2

Which of the following points is/are true about Linked List data structure when it is compared with array (A) Arrays have better cache locality that… Read More »

## Data Structures | Stack | Question 2

Which one of the following is an application of Stack Data Structure? (A) Managing function calls (B) The stock span problem (C) Arithmetic expression evaluation… Read More »

## Data Structures | Queue | Question 1

Following is C like pseudo code of a function that takes a Queue as an argument, and uses a stack S to do processing. filter_none… Read More »

## Data Structures | Stack | Question 1

Following is C like pseudo code of a function that takes a number as an argument, and uses a stack S to do processing. filter_none… Read More »