Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 4 (60 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. How do you access the first element of a list?
2. Which data structure is mainly used for implementing the recursive algorithm?
3. Consider the following array:[7, 4, 2, 8, 5, 1, 6, 3]. If you use the QuickSort algorithm and choose the pivot as the last element, what will be the array after the first partitioning step?
4. What would be the Prefix notation for the given equation?A+(B*C)
5. How can you access the value associated with a specific key in a dictionary?
6. Which of the following lines of code will cause an error? Use the following definition of ages:ages = (12, 5, 8)
7. What happens when you delete a node from a singly linked list?
8. A binary search tree is generated by inserting in order the following integers:50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24 The number of the node in the left sub-tree and right sub-tree of the root, respectively, is
9. How do you use the map function in Python?
10. The height of a Binary Search Tree is given as h. Consider the height of the tree as the no. of edges in the longest path from root to the leaf. The maximum no. of nodes possible in the tree is?
11. In the ..... traversal we process all of a vertex's descendents before we move to an adjacent vertex.
12. Python built-in data structures are
13. How do you remove a key-value pair from a dictionary in Python?
14. In a 2D array with dimensions m x n, how are elements stored in memory?
15. What data structure is used for breadth first traversal of a graph?
16. Full form of LIFO is .....
17. ..... operation returns the value of the topmost element of the stack.
18. If a node having two children is to be deleted from binary search tree, it is replaced by its
19. What is a hash table and how does it work?
20. List and explain the common sorting algorithms in Python.
21. (A):Queue is an ordered collection of items (B):Queue is an example for non-linear data structure
22. What is a dequeue?
23. Process of removing an element from stack is called .....
24. What are the main types of data structures in Python?
25. In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into a NONEMPTY queue?
26. When analyzing the function call syntax 'fun()', what distinguishes this from a variable reference?
27. Which data structure in Python is best suited for implementing a stack?
28. Which of the following types of queues is used to handle multiple tasks in a real-time system where tasks are prioritized?
29. Why would a programmer choose to break down a complex program into multiple functions rather than writing everything in one large block of code?
30. Which statement is true about Python dictionaries?Criterion 1:Evaluate and select information sources based on their appropriateness to specific tasks
31. Which of the following is non-linear data structure?
32. What is the main difference between a set and a list?
33. In binary tree nodes with no successor are called terminal nodes
34. Define linear data structures and give an example in Python.
35. A queue is a ..... data structure in which each element that was inserted first is the first one to be taken out.
36. What are the disadvantages of arrays?
37. A tree is composed of ..... connected by edges or lines.
38. What is the maximum number of children that a node can have in a binary tree?
39. What is the correct way to create a set in Python?
40. What method in Python is used to check if a key exists in a dictionary?
41. The optimal data structure used to solve Tower of Hanoi is .....
42. What is the name given to a number that corresponds to the location of an item of data in an array?
43. How do you access the value for a key?
44. How do you add an element to the end of a list in Python?
45. Arranging elements of a data structure in increasing or decreasing order is known as .....
46. Consider the following operation performed on a stack of size 5.Push(1);Pop();Push(2);Push(3);Pop();Push(4);Pop();Pop();Push(5);After the completion of all operation, get the total number of element present in stack is
47. To measure Time complexity of an algorithm Big O notation is used which:
48. What is the difference between linear search and binary search?
49. Stacks follows ..... order
50. Which data structure in Python follows the First In First Out (FIFO) principle?
51. A Binary Tree can have
52. Queue Implementation using Array. Array name is Queuearray and rear is the current element pointer and "data" is the new item to be added. For adding a new element int the queue, is the following statement correct? queue[rear] = data;Queuearray[rear] = data;
53. A complete binary tree with 5 levels has how many nodes? (Root is Level 1)
54. When designing a function for 'Multiplying Numbers', what parameter design would provide the most flexibility?
55. How can we describe an array in the best possible way?
56. In ..... , search start at the beginning of the list and check every element in the list.
57. ..... approach is best to solve 0/1 Knapsack problem
58. A record allows multiple data items to be stored using ..... ..... to identify each item of data
59. 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?
60. Example of linear data structure except