DATA STRUCTURES MCQs with answers |part 1| - letsbug

    Data structures MCQs(multiple choice questions) with answers we have 25 questions sets.

1. Process of inserting an element in stack is called _________.

  1. Create
  2. Push 
  3. Evaluation
  4. Pop

Answer: 2 : Push

2. Process of removing and element from stack is called _______.

  1. Create 
  2. Push
  3. Evaluation
  4. Pop

Answer: 4 : Pop

3. In a stack, if a user tries to remove an element from empty stack it is called ________.

  1. Underflow
  2. Empty collection
  3. Overflow
  4. Garbage Collection

Answer: 1 : Underflow

4. Push an element into already having five elements and stack size of 5 then stack becomes

  1. Overflow
  2. Crash
  3. Underflow
  4. User flow

Answer: 1: Overflow.

5. What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm?

  1. Linked List
  2. Stack
  3. Queue
  4. Tree

Answer: 2 : Stack

6. The process of accessing data stored in a serial access memory is similar to manipulating data on a ________.

  1. Heap
  2. Binary Tree
  3. Array
  4. Stack

Answer: 4 : Stack

7. A linear list of elements in which deletion can be done from one end(front) and insertion can take place only at the other end (rear) is known as a?

  1. Queue
  2. Stack
  3. Tree
  4. Linked List

Answer: 1 : Queue

8. The data structure required for Breadth First Traversal on a graph is? 

  1. Stack  
  2. Array
  3. Queue
  4. Tree

Answer: 3: Queue

9. A queue follows _______. 

  1. FIFO (First In First Out) principle
  2. LIFO (Last In First Out) principle
  3. Ordered array
  4. Linear tree

Answer: 1 : FIFO(First In First Out) principle

10. Circular Queue is also known as ________.

  1. Ring Buffer
  2. Square Buffer
  3. Rectangle Buffer
  4. Curve Buffer

Answer: 1: Ring Buffer

11. If the elements "A", "B", "C" and "D" are placed in a queue and are deleted one at a time, in what order will they be removed? 

  1. ABCD
  2. DCBA
  3. DCAB
  4. ABDC

Answer: 1: ABCD 

12. A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?

  1. Queue
  2. Circular Queue
  3. Dequeue
  4. Priority queue

Answer: 3 : Dequeue

13. A normal queue, if implemented using an array of size MAX_SIZE, gets full when. 

  1. Rear = MAX_SIZE - 1
  2. Front = (rear + 1) mod MAX_SIZE
  3. Front = rear + 1
  4. Rear = front

Answer: 1 : Rear = MAX_SIZE - 1

14. A linear collection of data elements where the linear node is given by means of pointer is called?  

  1. Linked List
  2. Node List
  3. Primitive List
  4. Unordered List

Answer: 1: Linked List

15. Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only. Give the representation, when of the following operations can be implemented in O(1) time?    

i. Insertion at the front of the linked list
ii. Insertion at the end of the linked list
iii. Deletion of the front node of the linked list
iv. Deletion of the last node of the linked list    
  1. i and ii
  2. i and iii
  3. i, ii and iii
  4. i, ii and iv

Answer: 2: i and iii

16. In linked list each node contain minimum of two fields. One field is data field to store the data second field is?

  1. Pointer to character 
  2. Pointer to integer
  3. Pointer to node
  4. Node

Answer: 3 : Pointer to node

17. What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list? 

  1. O(1)
  2. O(n)
  3. 0(n)
  4. 0(1)

Answer: 1: O(1)

18. What would be the asymptotic time complexity to insert and element at the front of the linked list(head is known)?

  1. O(1)
  2. O(n)
  3. O(n2)
  4. O(n3)

Answer: 1 : O(1)

19. the concatenation of two list can be performed in O(1) time. Which of the following variation of linked list can be used? 

  1. Singly linked list
  2. doubly linked list
  3. Circular doubly linked list
  4. Array implementation of list

Answer: 2 : doubly linked list 

20.  Consider the following definition of C programming language

struct node
{
    int data;
    struct node * next;
}
typedef struct node NODE;
NODE *ptr;

which of the following C code is used to create new node? 

  1. ptr = (NODE*)malloc(sizeof(NODE));
  2. ptr = (NODE*)malloc(NODE);
  3. ptr = (NODE*)malloc(sizeof(NODE*));
  4. ptr = (NODE)malloc(sizeof(NODE));

Answer: 1

ptr = (NODE*)malloc(sizeof(NODE));

21. Linked list is considered as an example of ________ type of memory allocation.

  1. Dynamic
  2. Static
  3. Compile time
  4. Heap

Answer: 1 : Dynamic 

22. In linked list implementation, a node carries information regarding _________.

  1. Data
  2. Link
  3. Data and Link
  4. Node

Answer: 3: Data and Link

23. What is a memory efficient doubly linked list?

  1. Each node has only one pointer to traverse the list back and forth
  2. The list has breakpoints for faster traversal
  3. An auxiliary singly linked list acts as a helper list to traverse through the doubly linked list
  4. A doubly linked list that uses bitwise AND operator for storing addresses

Answer: 1 : Each node has only one pointer to traverse the list back and forth  

24. What differentiates a circular linked list from a normal linked list? 

  1. You cannot have the 'next' pointer point to null in a circular linked list
  2. It is faster to traverse the circular linked list
  3. You may or may not have the 'next' pointer point to null in a circular linked list
  4. Head node is known in circular linked list.

Answer: 1 : You cannot have the 'next' pointer point to null in a circular linked list

25. Which of the following application makes use of a circular linked list? 

  1. Undo operation in a text editor
  2. Recursive functions calls
  3. Allocating CPU to resources
  4. Implement Hash Tables

Answer: 3 : Allocating CPU to resources

Another set of 25 MCQs click here.

Comments

Categories

Big Data Analytics Binary Search Binary Search Tree Binary To Decimal binary tree Breadth First Search Bubble sort C Programming c++ Chemical Reaction and equation class 10 class 10th Class 9 Climate Complex Numbers computer network counting sort CSS Cyber Offenses Cyber Security Cyberstalking Data Science Data Structures Decimal To Binary Development diamond pattern Digital Marketing dust of snow Economics Economics Lesson 4 Email Validation English fire and ice Food Security in India Footprints Without feet Forest And Wildlife Resources game Geography Geography lesson 6 glassmorphism Glossary Graph HackerRank Solution hindi HTML image previewer India-Size And Location Insertion Sort Internet Network Status Interview Questions Introduction to cyber crime and cyber security IT javascript tricks json to CSV converter lesson 2 lesson 1 lesson 2 Lesson 3 Lesson 6 lesson 7 Life lines of National Economy life processes Linear Search Linked List lowest common ancestor Machine Learning MCQs median in array Merge sort min and max of two numbers Moment Money and Credit My Childhood Natural Vegetation and Wildlife NCERT Network connectivity devices Network Models Network Security No Men Are foreign Node.js operator overloading P5.js PHP Physical features of India Population Prime Numbers python Quick sort R language Rain on the roof Regular Expression Resources and development reversing array saakhi science Searching Algorithm Selection sort Social Media Marketing social science Software Engineering Software Testing Sorting Algorithm Stacks staircase pattern System Concepts Text Recognition The last Leaf time converter Time Passed From A Date Todo List App Tree Trending Technologies Understanding Economic Development username and password video player Visualization water resources Wired And Wireless LAN साखी
Show more

Popular Posts

Big Data MCQs(multiple choice questions) with answers - letsbug

Digital Marketing MCQ(Multiple Choice Questions) with Answers | part 1 | letsbug

Software Engineering MCQs questions with answers - letsbug