# Data Structure And Algorithms

10 Questions | Total Attempts: 55

Settings

Each question contains equal marks. Time: 10 Mins Maximum Marks: 10

• 1.
The worst case complexity of bubble sort is ____________.
• A.

O(nlogn)

• B.

O(logn)

• C.

O(n)

• D.

O(n2)

• 2.
How many iterations will be required to sort the following array, arr={4,5,7,6} using bubble sort algorithm?
• A.

4

• B.

2

• C.

1

• D.

0

• 3.
___________  datastructure is appropriate to elicite hierarchical relationship between items.
• A.

Graph

• B.

Tree

• C.

• D.

Priority Queue

• 4.
The binary Search algorithm is based on
• A.

Brute Force technique

• B.

Divide and conquer

• C.

Greedy algorithm

• D.

Dynamic programming

• 5.
• A.

Arrays have better cache locality that can make them better in terms of performance.

• B.

It is easy to insert and delete elements in Linked List

• C.

Random access is not allowed in a typical implementation of Linked Lists

• D.

The size of array has to be pre-decided, linked lists can change their size any time.

• E.

All of the above

• 6.
Given the value of the size of the stack, STACK_SIZE is 10; what is the value of the top pointer?
• A.

10

• B.

9

• C.

11

• D.

12

• E.

None

• 7.
The queue doesn't support the following operation
• A.

Insertion

• B.

Deletion

• C.

Retrieval

• D.

Traversal

• 8.
• A.

Prints all nodes of linked lists

• B.

Prints all nodes of linked list in reverse order

• C.

Prints alternate nodes of Linked List

• D.

Prints alternate nodes in reverse order

• 9.
What will be the Output of the following code?
• A.

Value of jRef: 20, Value of j: 25

• B.

Value of jRef: 25, Value of j: 20

• C.

Value of jRef: 20, Value of j: 20

• D.

Value of jRef: 25, Value of j: 25

• E.

None

• 10.
Following is/are the differences between References and Pointers:
• A.

No null references as pointers do

• B.

A reference is bound to its initializer for its whole lifetime, pointers don’t

• C.

A reference must be initialized after object is created, pointers can be initialized any time

• D.

All of the above

Related Topics