0

Data Structure

Description: This test consists of computer programming related questions based on data structures concept.
Number of Questions: 20
Created by:
Tags: data structure gate Data Structure
Attempted 0/20 Correct 0 Score 0

Stack is an example of

  1. static data structure

  2. complex data structure

  3. global data structure

  4. built-in data structure

  5. both (1) and (2)


Correct Option: B
Explanation:

Stack is a complex data structure as it is made by the built-in data structures.

Which of the following is called stack underflow operation?

  1. This is an attempt to delete an element from the already empty stack.

  2. This is an attempt to remove an element from the top of the stack.

  3. This is an attempt to insert an element to the top of the stack.

  4. This is an attempt to delete an element from the already full stack.

  5. None of the above


Correct Option: A
Explanation:

This is true about stack underflow.

Which of the following sorting techniques is based on divide and conquer method?

  1. Merge sort

  2. Quick sort

  3. Shell sort

  4. Insertion sort

  5. None of the above


Correct Option: A
Explanation:

Merge sort is based on divide and conquer method.

Which of the following is not a stack operation?

  1. Push

  2. Pop

  3. Peek

  4. Size

  5. None of the above


Correct Option: E
Explanation:

All of the above are the operations of a stack.

Which of the following operations of stack needs parameter in its method?

  1. Push

  2. Pop

  3. isEmpty

  4. Peek

  5. None of the above


Correct Option: A
Explanation:

This operation requires parameters as the item to be inserted.

Which of the following is/are unstable sort(s)?

  1. Insertion sort

  2. Quick sort

  3. Heap sort

  4. All of the above

  5. Only (2) and (3)


Correct Option: E
Explanation:

Both are the unstable sorting algorithms.

Which of the following is/are the implementation(s) of the queue data structure?

  1. List

  2. Singly linked list

  3. Array

  4. All of the above

  5. None of the above


Correct Option: B
Explanation:

A singly linked list implements queue data structure. In queue, addition is done at the bottom and deletion is done from the top. This is the feature of singly linked list.

Which of the following is/are the true statement(s)?

  1. Queue implementation is used in software development.

  2. In multitasking environment, the queue technique is used.

  3. Queues are used in printers.

  4. All of the above

  5. Only (2) and (3)


Correct Option: D
Explanation:

Yes, all are based on the queue technique.

Which of the following is not an application of queue data structure?

  1. CPU scheduling

  2. Disk scheduling

  3. File IO

  4. Backtracking

  5. None of the above


Correct Option: D
Explanation:

It is not an application of a queue data structure. It is an application of stack data structure.

File system on a computer is an example of which of the following data structures?

  1. Stack

  2. Tree

  3. Queue

  4. Array

  5. None of the above


Correct Option: B
Explanation:

File system stores information in a hierarchical manner, hence it is an example of tree data structure.

Routing algorithm is an example of which of the following data structures?

  1. Stack

  2. Queue

  3. Tree

  4. Array

  5. None of the above


Correct Option: C
Explanation:

It is an example of tree data structure because it stores the information in hierarchical manner in the networking medium.

Graph data structure is used in which of the following?

  1. Network communication

  2. Flow of computation

  3. Data organisation

  4. All of the above

  5. Only (1) and (2)


Correct Option: D
Explanation:

Yes, all of the above are the example of graph data structure.

Which of the following is/are the uses of a tree data structure?

  1. To manipulate hierarchical data

  2. To make information easy to search

  3. To manipulate sorted lists of data

  4. All of the above

  5. Only (1) and (2)


Correct Option: D
Explanation:

All are the basic used of tree data structure.

Which of the following is/are built-in data structures?

  1. Stack

  2. Queue

  3. Array

  4. All of the above

  5. Only (1) and (3)


Correct Option: C
Explanation:

It is a built-in data structure.

Breadth-first search is an example of which of the following data structures?

  1. Stack

  2. Queue

  3. Array

  4. Linked list

  5. None of the above


Correct Option: B
Explanation:

Breadth-first search uses the queue data structure to search the node in the graph according to the FIFO basis,

Which of the following is/are the application(s) of an array data structure?

  1. Database implementation

  2. Dynamic memory allocation

  3. Implementing stack and queue

  4. To implement hash tables

  5. All of the above


Correct Option: E
Explanation:

Yes, all are the applications of the array data structure.

Which of the following is/are the applications of a linked list data structure?

  1. To represent polynomials

  2. Linked list is used in dynamic memory management and in allocation and releasing memory at runtime

  3. Representing sparse matrix

  4. All of the above

  5. Only (1) and (3)


Correct Option: D
Explanation:

All are the applications of linked list data structure.

Decimal to binary conversion can be implemented using which of the following data structures?

  1. Stack

  2. Queue

  3. Array

  4. Both (1) and (3)

  5. None of the above


Correct Option: A
Explanation:

Decimal to binary conversion has the steps to divide the decimal number by 2 and get the binary form. This is stored in a stack. After completing this step, the binary format  pops out from the stack.

Which of the following statements is/are true about the double-ended queue?

  1. Double-ended queue is an abstract data type.

  2. In double-ended queue, elements can be added to or removed from either the front or back end.

  3. Double-ended queue is also called deque.

  4. All of the above

  5. Only (1) and (3) are true.


Correct Option: D
Explanation:

Yes, all are true statements about the double-ended queue.

Dijkstra's algorithm is an example of which of the following data structures?

  1. Queue

  2. Stack

  3. Priority queue

  4. Array

  5. None of these


Correct Option: C
Explanation:

In Dijkstra's algorithm, we can alter the priority of a particular vertex in the priority queue efficiently.

- Hide questions