Hiremee Quiz on Arrays, Linked Lists, Trees, Graphs with Answers

Question 1

Time: 00:00:00
In a Doubly Linked list how many nodes have atleast 1 node before and after it?

N+1

N+1

N

N

N-2

N-2

N-1

N-1

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
Raman is 7 years old and he wants to color a book. The book happens to be about DSA and contains a Complete binary tree with 7 levels, he wants to use different color for every tree nodes. How many colors will he need?

28

28

31

31

63

63

127

127

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
A linear collection of data elements where the linear node is given by means of pointer is called?

primitive list

primitive list

None of these

None of these

node list

node list

linked list

linked list

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
Which of the following is true about bipartite Graph?

no cycle of odd length

no cycle of odd length

n^log n

n^log n

n edges

n edges

a cycle of odd length

a cycle of odd length

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

A Bipartite Graph is a graph whose vertices can be divided into two independent sets, U and V such that every edge (u, v) either connects a vertex from U to V or a vertex from V to U. In other words, for every edge (u, v), either u belongs to U and v to V, or u belongs to V and v to U. We can also say that there is no edge that connects vertices of the same set.

Start

Question 5

Time: 00:00:00
What is Dynamic Allocation in Array?

Allocation that takes place at compile time

Allocation that takes place at compile time

Allocation that take place as bipartite graph

Allocation that take place as bipartite graph

memory allocation that takes place during run time rendering the resizing of an Array

memory allocation that takes place during run time rendering the resizing of an Array

All of these

All of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
Raman is 7 years old and he wants to colour a book. The book happens to be about DSA and contains 8 vertices in an undirected graph with 7 levels, he wants to use a different colour for every node. How many colors will he need?

63

63

63

63

28

28

32

32

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
The height of a BST is given as h. Consider the height of the tree as the no. of edges in the longest path from root to the leaf. The maximum no. of nodes possible in the tree is?

2h-1 -1

2h-1 -1

2h+1 -1

2h+1 -1

2h +1

2h +1

2h-1 +1

2h-1 +1

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
Which type of traversal of binary search tree outputs the value in sorted order?

Post-order

Post-order

Pre-order

Pre-order

In-order

In-order

None

None

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
the run time for traversing all the nodes of a binary search tree with n nodes and printing them in an order is

O(n)

O(n)

O(√n)

O(√n)

O(log(n))

O(log(n))

O(nlg(n))

O(nlg(n))

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
A binary search tree is generated by inserting in order the following integers:
50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24

The number of the node in the left sub-tree and right sub-tree of the root, respectively, is

(3, 8)

(3, 8)

(8, 3)

(8, 3)

(7, 4)

(7, 4)

(4, 7)

(4, 7)

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice! \r\n \r\n \r\n","Keep trying! \r\n \r\n \r\n","Not bad! \r\n \r\n \r\n","Good work! \r\n \r\n \r\n","Perfect! \r\n \r\n \r\n"]