About Data Structure

Following are some of the multiple choice questions on the Data Structure with answers that will help the students in developing their knowledge.

Data Structure MCQ

1. Select ALL the situations that a Queue data structure would be used?

  • Printer in a room full of computers
  • Characters typed on a keyboard
  • Back Button
  • Undo Button

2. Queue is using the order called FIFO while stack follows the order of LIFO or ________.

  • FILO
  • First In Last Out
  • FIRST IN LAST OUT
  • filo

3. In linked list, the elements are using _________ to linked the data item to the next address in memory location.

  • pointer
  • pointers
  • POINTER
  • POINTERS
  • Pointer

4. __________ are used to represent networks. The networks may include paths in a city or telephone network or circuit network.

  • Graphs
  • graphs
  • GRAPHS

5. How do you call this special function that is used to map a given value with a particular key for faster access of elements?

  • merge
  • sorted array
  • hash
  • bubble

6. What do you this data structure classification in which the elements are stored/accessed on a non-linear order such as trees and graphs.

  • trees
  • linear
  • non-linear
  • graphs

7. Why do we need to organize data in a computer? Check all possible answers.

  • You will easily direct someone to access a file for you.
  • You will easily update back-ups or switch computers.
  • You will always know where to find what you need.
  • You will never waste time where to save anything.

8. What does LIFO stand for?

  • Last In First Out
  • Least In Flow Out
  • Last In Flow Out
  • Last In First Object

9. A _______________ is a linear data structure, in which elements are not stored at contiguous memory locations.

  • Linked List
  • linked list
  • LINKED LIST
  • Linked list

10. Which of the following are examples of Data Structures?

  • Linear List
  • Linked List
  • Stacks
  • Trees
  • Pseudocodes

11. What do you call a collection of items stored at contiguous memory locations?

  • Linked List
  • Linear List
  • Array
  • Data Structure

12. Data structures have sizes, structures and memory locations that can shrink or expand depending on the use.

  • Dynamic

13. Data structures have fixed sizes, structures and memory locations at compile time.

  • Static

14. Which of the following is a characteristic of an algorithm?

  • Finiteness
  • Ambiguous
  • Dependent
  • Impossible

15. Which of the following are not a criteria for ADT specification?

  • Definitions
  • Formal
  • Axioms
  • Extensible

16. Which of the following are sorting algorithms?

  • Bubble
  • Merge
  • Linear
  • Insertion

17. It is the process of arranging a list of elements in a particular order.

  • Search
  • Sorting
  • Elements

18. In this type of search, a sequential search is made over all items one by one.

  • Search
  • Binary Search
  • Linear Search

19. As the number of items in the sorted array grows, it only takes a logarithmic time relationship to find any given item.

  • O(1)
  • O(log n)
  • O(n²)

20. It is a measure of how well a computer algorithm scales as the amount of data involved increases.

  • Big logN Notation
  • Big X Notation
  • Big O Notation

21. This is a theoretical analysis of an algorithm.

  • A Posterior Analysis
  • A Priori Analysis
  • A Pesterio Analysis

22. It is a method of solving problems that involves breaking a problem down into smaller and smaller sub problems until you get to a small enough problem that it can be solved trivially.

  • Recursion
  • Iteration
  • Looping

23. It is a step by step process to solve a given problem. Take the simplest example below.

  • Pseudo code
  • Programming
  • Algorithm

24. This characteristic describes whether the data items are arranged in chronological sequence, such as with an array, or in an unordered sequence, such as with a graph.

  • Static or dynamic
  • Linear or non-linear
  • Homogeneous or non-homogeneous

25. It is a specialized way of storing and organizing data in a computer so that it can be used efficiently.

  • Data Structure
  • Data Type
  • Variables

26. It is a view or representation of an entity that includes only the most significant attributes

  • Abstract Data Type
  • Abstraction
  • Abstracted

27. What would happen if...deQueue()enQueue(Hanna)enQueue(Steve)enQueue(Jack)

  • front = 1 rear = 0*and Steve would be unable to be added to position 0.
  • front = 1 rear = 5*and Jack would be unable to be added to position 0
  • front = 0 rear = 5
  • front = 0 rear = 4
  • front = 1 rear = 4

28. Where would pointers be pointing if...Eli leaves the Queue. Hanna joins the Queue.Adam joins the Queue.Jason leaves the Queue.

  • front = 0 rear = 5
  • front = 1 rear = 4
  • front = 2 rear = 4
  • front = 0 rear = 4
  • front = 2 rear = 5

29. Where would pointers be pointing if...Eli leaves the QueueAdam joins the Queue

  • front = 0 rear = 3
  • front = 1 rear = 4
  • front = 2 rear = 3
  • front = 0 rear = 4
  • front = 0 rear = 4

30. Select operations that can be performed on a Queue Data Structure...

  • isEmpty()
  • pop()
  • push()
  • isFull()
  • Append(Item)

31. Which is the correct operation for:"Add a item to the front of the queue."

  • enQueue(item)
  • Append.Queue(item)
  • enQueue()
  • AddItem(EnQueue())
  • Cant be performed on a Queue.

32. Which is the correct operation for:"Remove the rear item from the queue and return it"

  • dQueue()
  • de.Queue(Item)
  • deQueue()
  • item.remove()
  • Cant be performed on a Queue Data Structure.

33. Which is the correct operation for:"Remove the front item from the queue and return it"

  • dQueue()
  • de.Queue(Item)
  • deQueue()
  • item.remove()
  • Cant be performed on a Queue Data Structure.

34. Which is the correct operation for: "Add a item to the rear of the queue."

  • enQueue(item)
  • Append.Queue(item)
  • enQueue()
  • AddItem(EnQueue())

35. 2-3-4 trees are B-trees of order 4. They are an isometric of _____ trees.

  • a) AVL
  • b) AA
  • c) 2-3
  • d) Red-Black

36. Which value is assigned/set at front and rear ends during the Initialization of a Queue?

  • a. 0
  • b. 1
  • c. - 1
  • d. infinity

37. In a B+ tree, both the internal nodes and the leaves have keys.

  • 1. True
  • 2. False

38. What is the maximum number of keys that a B+ -tree of order 3 and of height 3 have?

  • 1. 3
  • 2. 80
  • 3. 27
  • 4. 26

39. Statement 1: When a node is split during insertion, the middle key is promoted to the parent as well as retained in right half-node.Statement 2: When a key is deleted from the leaf, it is also deleted from the non-leaf nodes of the tree.

  • 1. Statement 1 is true but statement 2 is false
  • 2. Statement 2 is true but statement 1 is false
  • 3. Both the statements are true
  • 4. Both the statements are false

40. 2-3 tree is a specific form of _________

  • 1. B – tree
  • 2. B+ – tree
  • 3. AVL tree
  • 4. Heap

41. Which of the following is true?

  • a) larger the order of B-tree, less frequently the split occurs
  • b) larger the order of B-tree, more frequently the split occurs
  • c) smaller the order of B-tree, more frequently the split occurs
  • d) smaller the order of B-tree, less frequently the split occurs

42. Compression techniques can be used on the keys to reduce both space and time requirements in a B-tree.

  • True
  • False

43. What is the best case height of a B-tree of order n and which has k keys?

  • a) logn (k+1) – 1
  • b) nk
  • c) logk (n+1) – 1
  • d) klogn

44. B-tree of order n is a order-n multiway tree in which each non-root node contains __________

  • a) at most (n – 1)/2 keys
  • b) exact (n – 1)/2 keys
  • c) at least 2n keys
  • d) at least (n – 1)/2 keys

45. Identify the types of sorting that used partition and exchange sort.

  • Bubble sort
  • Selection sort
  • Quick sort
  • Merge sort

46. Identify the best answer for the statement given below“ is any process of arranging items in some sequence and/or in different sets, and accordingly”

  • Searching
  • Sorting
  • Hashing
  • Fixing

47. Which of the following is the most widely used external memory data structure?

  • a) AVL tree
  • b) B-tree
  • c) Red-black tree
  • d) Both AVL tree and Red-black tree

48. Five node splitting operations occurred when an entry is inserted into a B-tree. Then how many nodes are written?

  • a) 14
  • b) 7
  • c) 11
  • d) 5

49. B-tree and AVL tree have the same worst case time complexity for insertion and deletion.

  • a) True
  • b) False

50. What should be the value of rear (end) if the queue is full (elements are completely occupied )?

  • a. 1
  • b. - 1
  • c. MAX + 1
  • d. MAX - 1

Enjoyed the Quiz. Share this with friends

Comments

Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.