204
99.7k

550+ Data Structures (DS) Solved MCQs

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Computer Science Engineering (CSE) , Information Technology Engineering (IT) , Bachelor of Science in Computer Science FY (BSc CS) , Bachelor of Science in Information Technology FY (BSc IT) , Bachelor of Computer Applications (BCA) .

Chapters

More MCQs
351.

In ___ Data Structure data can be processed one by one sequentially

A. array
B. linked list
C. tree
D. none of these
Answer» B. linked list
352.

When we insert an element in Queue, which pointer is increased by one?

A. front
B. rear
C. both a & b
D. none of these
Answer» B. rear
353.

Which of the following is not the possible operation on stack?

A. push
B. pop
C. display
D. enqueue
Answer» D. enqueue
354.

Which of the following is a possible operation on queue?

A. push
B. pop
C. display
D. enqueue
Answer» D. enqueue
355.

In stack, to display the lastly inserted element without removing it, which function is used?

A. push
B. pop
C. display
D. peek
Answer» D. peek
356.

if there are no nodes in linked list then start pointer will point at which value?

A. null
B. garbage
C. 1
D. 2
Answer» A. null
357.

Worst space complexity of queue data structure is

A. o(n)
B. o(log(n))
C. o(1)
D. n/a
Answer» A. o(n)
358.

Worst space complexity of stack data structure is

A. o(log(n))
B. o(1)
C. n/a
D. o(n)
Answer» D. o(n)
359.

A ___________refers to a single unit of values.

A. data value.
B. attribute value.
C. data item.
D. elementary.
Answer» C. data item.
360.

Data items that are divided into subitems are called ___________.

A. single items.
B. group items.
C. elementary items.
D. entity items.
Answer» B. group items.
361.

Which of these best describes an array?

A. A data structure that shows a hierarchical behavior
B. Container of objects of similar types
C. Container of objects of mixed types
D. All of the mentioned
Answer» B. Container of objects of similar types
362.

In _______________all the records contain the same data items with the same amount of space.

A. variable-length records.
B. fixed-length records.
C. subscripted variable.
D. superscripted variable.
Answer» B. fixed-length records.
363.

The logical or mathematical model of a particular organization of data is called a _______________.

A. data structure.
B. algorithms.
C. structure.
D. logic structure.
Answer» A. data structure.
364.

Arrays are best data structures for _____________________________.

A. relatively permanent collections of data.
B. the size of the structure and the data in the structure are constantly changing.
C. both of above situation.
D. None of the above.
Answer» A. relatively permanent collections of data.
365.

How do the nested calls of the function get managed?

A. Through Queues.
B. Through Stacks.
C. Through Trees.
D. Through Graphs.
Answer» B. Through Stacks.
366.

__________is combining the records in two different sorted files in to a single sorted file.

A. Sorting.
B. Searching.
C. Listing.
D. Merging.
Answer» D. Merging.
367.

In linear search algorithm the Worst case occurs when ____________.

A. The item is somewhere in the middle of the array.
B. The item is not in the array at all.
C. The item is the last element in the array.
D. The item is the last element in the array or is not there at all.
Answer» D. The item is the last element in the array or is not there at all.
368.

The complexity of Binary search algorithm is ____________.

A. O(n).
B. O(log n ).
C. O(n2).
D. O(n log n).
Answer» B. O(log n ).
369.

The complexity of Bubble sort algorithm is _________.

A. O(n).
B. O(log n).
C. O(n2).
D. O(n log n).
Answer» C. O(n2).
370.

Inorder traversal of binary search tree will produce _______________.

A. unsorted list.
B. sorted list.
C. reverse of input.
D. none of these.
Answer» B. sorted list.
371.

Sub algorithms fall into two basic categories: function sub algorithms and ____________ sub algorithms.

A. procedure.
B. argument.
C. processor.
D. methods.
Answer» A. procedure.
372.

Two main measures for the efficiency of an algorithm are____________.

A. Processor and memory.
B. Complexity and capacity.
C. Time and space.
D. Data and space.
Answer» C. Time and space.
373.

New data are to be inserted into a data structure, but there is no available space; this situation is usually called__________.

A. Underflow.
B. Overflow.
C. Houseful.
D. Saturated.
Answer» B. Overflow.
374.

Which of the following data structure is linear data structure?

A. Tree.
B. Graph.
C. Array.
D. Linked list.
Answer» C. Array.
375.

Which of the following is an example of dynamic programming approach?

A. Fibonacci Series
B. Tower of Hanoi
C. Dijkstra Shortest Path
D. All of the above
Answer» D. All of the above
376.

The memory address of the first element of an array is called_________.

A. floor address.
B. foundation address.
C. first address.
D. base address.
Answer» D. base address.
377.

Which data structure allows deleting data elements from front and inserting at rear?

A. Stacks.
B. Queues.
C. Dequeues.
D. Binary search tree.
Answer» B. Queues.
378.

Binary search algorithm cannot be applied to________ concept.

A. unsorted linked list.
B. sorted binary trees.
C. sorted linear array.
D. pointer array.
Answer» A. unsorted linked list.
379.

Graph traversal is different from a tree traversal, because

A. trees are not connected.
B. graphs may have loops.
C. trees have root.
D. None is true as tree is a subset of graph.
Answer» C. trees have root.
380.

Linked lists are suitable for which of the following problems?

A. Insertion sort
B. Binary search
C. Radix sort
D. dequeue.
Answer» B. Binary search
381.

Identify the data structure which allows deletions at both ends of the list but insertion at only one end___________.

A. Input-restricted dequeue.
B. Output-restricted dequeue.
C. Priority queues.
D. Data structure.
Answer» A. Input-restricted dequeue.
382.

Which of the following data structure is non-linear type?

A. Strings.
B. Lists.
C. Stacks.
D. Hierarchical.
Answer» D. Hierarchical.
383.

To represent hierarchical relationship between elements, which data structure is suitable?

A. Dequeue.
B. Priority.
C. Tree.
D. Binary tree.
Answer» C. Tree.
384.

When does the ArrayIndexOutOfBoundsException occur?

A. Compile-time
B. Run-time
C. Not an error
D. None of the mentioned
Answer» B. Run-time
385.

The depth of a complete binary tree is given by__________.

A. Dn = n log2n.
B. Dn = n log2n+1.
C. Dn = log2n.
D. Dn = log2n+1.
Answer» D. Dn = log2n+1.
386.

When converting binary tree into extended binary tree, all the original nodes in binary tree are___________.

A. internal nodes on extended tree.
B. external nodes on extended tree.
C. vanished on extended tree.
D. post order traversal.
Answer» A. internal nodes on extended tree.
387.

Which of the following conditions checks available free space in avail list?

A. Avail=Top
B. Null=Avail
C. Avail=Null
D. Avail=Max stack
Answer» C. Avail=Null
388.

Which of the following sorting algorithm is of divide-and-conquer type?

A. Bubble sort.
B. Insertion sort.
C. Quick sort.
D. Algorithm.
Answer» C. Quick sort.
389.

STACK is also called as ______________.

A. FIFO
B. LIFO
C. FOLI
D. FOFI
Answer» B. LIFO
390.

Collection of related data items is called _______.

A. files
B. fields
C. attributes.
D. records.
Answer» D. records.
391.

Breadth First search is used in____________.

A. binary tree.
B. stacks.
C. graphs.
D. both a and c.
Answer» C. graphs.
392.

A variable whose size is determined at compile time and cannot be changed at run time is_________.

A. static variable.
B. dynamic variable.
C. not a variable.
D. data variable.
Answer» A. static variable.
393.

Process of inserting an element in stack is called ____________.

A. Create
B. Push
C. Evaluation
D. Pop
Answer» B. Push
394.

Length of linear array can be found by using the formula_________

A. UB-LB+1
B. LB+UB
C. LB-UB
D. LB-UB+1
Answer» A. UB-LB+1
395.

The average number of key comparisons done in a successful sequential search in a list of length n is___________.

A. log n
B. n-1/2.
C. n/2.
D. n+1/2.
Answer» D. n+1/2.
396.

A technique for direct search is _______________.

A. Binary Search
B. Linear Search
C. Tree Search
D. Hashing
Answer» D. Hashing
397.

Base address is the address of __________.

A. first element
B. middle element
C. last element
D. pivot element
Answer» A. first element
398.

A _____________ list is a list where the last node contains null pointer.

A. circular header.
B. grounded header.
C. rounded header.
D. linked header.
Answer» B. grounded header.
399.

___________are used to facilitate the processing of information in an array.

A. Pointers.
B. Memory location.
C. Records.
D. Variables.
Answer» A. Pointers.
400.

The comparison tree is also called as________.

A. decision tree.
B. binary tree.
C. sequential tree.
D. b+ tree.
Answer» A. decision tree.

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.