Fundamental Data Structures

Covers core data structure concepts including arrays, stacks, queues, linked lists, and trees, along with their operations and implementation in C++

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

______________ is recognised as a non-linear data structure.

  1. Stack
  2. Queue
  3. Linked list
  4. Tree
  5. Array
Question 2 Multiple Choice (Single Answer)

Which of the following is the essential condition required for binary search?

  1. The array list must be short in size.
  2. The array list must be arranged in descending order.
  3. The array list must be arranged in increasing order.
  4. The array list must have numbers in random order.
  5. The array list must be very lengthy.
Question 3 Multiple Choice (Single Answer)

_____________ is the process of accessing each element of the array exactly once to do some operation.

  1. Searching
  2. Sorting
  3. Traversing
  4. Merging
  5. Insertion
Question 4 Multiple Choice (Single Answer)

_______________ is the order in which all the first row elements are stored in sequential memory location then all the second row elements are stored and so on.

  1. Column-major order
  2. Row-major order
  3. Identity matrix
  4. Null matrix
  5. Square matrix
Question 5 Multiple Choice (Single Answer)

Which of the following is the greatest disadvantage of using arrays?

  1. Arrays are small in size.
  2. Arrays are very big in size.
  3. Arrays are static structures.
  4. Arrays are dynamic structures.
  5. Arrays are easier to implement.
Question 6 Multiple Choice (Single Answer)

Which of the following is the operation in which a new data or element is inserted into the stacks?

  1. Pop
  2. Push
  3. Top
  4. Size
  5. Stack
Question 7 Multiple Choice (Single Answer)

_______________ specifies the overflow condition in stack.

  1. Top = - 1
  2. Top = N - 1
  3. Top = 0
  4. Top = 1
  5. Top = N
Question 8 Multiple Choice (Single Answer)

Which of the following is the correct conversion of the infix expression A+B*C into postfix expression?

  1. AB+C*
  2. +A*BC
  3. ABC*+
  4. AB+*C
  5. AB*C+
Question 9 Multiple Choice (Single Answer)

Which of the following operators is used in C++ to dynamically allocate memory space for a new node in the linked list?

  1. Delete
  2. Malloc
  3. Calloc
  4. Delete []
  5. New
Question 10 Multiple Choice (Single Answer)

Which of the following type of queues is the one in which all nodes are treated as circular such that the last node follows the first node?

  1. Simple queue
  2. Priority queue
  3. Dequeue
  4. Circular queue
  5. Square queue
Question 11 Multiple Choice (Single Answer)

___________ pointer is incremented in a queue when a new element is added.

  1. Front
  2. Rear
  3. Top
  4. Exit
  5. Break
Question 12 Multiple Choice (Single Answer)

Which of the following is the technique in which if a node is deleted from the linked list then the memory space of the deleted node is immediately reinserted into the free storage?

  1. Traversing
  2. Underflow
  3. Garbage collection
  4. Start
  5. Null
Question 13 Multiple Choice (Single Answer)

Which of the following datatypes is used in C++ to implement linked list in a program?

  1. Array
  2. Pointer
  3. Structure
  4. Function
  5. Union
Question 14 Multiple Choice (Single Answer)

Which of the following is the first operation performed on a linked list?

  1. Traversing a linked list
  2. Inserting an item into a linked list
  3. Creating a linked list
  4. Deleting an item from the linked list
  5. Searching an item in a linked list
Question 15 Multiple Choice (Single Answer)

______________ is a tree in which each leaf node is at the same distance from the root.

  1. Binary tree
  2. Complete tree
  3. Subtree
  4. Leaf node
  5. Root node