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

Quiz Instructions

Select an option to see the correct answer instantly.

1. You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list?
2. Which is function in C?
3. What method in Python is used to merge two dictionaries?
4. Elements are added in queue at
5. It is a mathematical object which arises in many physical problems, consists of m rows and n columns
6. Given an undirected graph G with V vertices and E edges, the sum of the degrees of all vertices will be?
7. This is a binary tree in which every level of the tree is completely filled except the last level
8. ..... is a prerequisite for the binary search.
9. What is the main characteristic of a queue?
10. What is the purpose of a hash function in data structures?
11. Which of the following points is/are not true about Linked List data structure when it is compared with an array?
12. What is the primary difference between an array and a list in Python?
13. If two trees have same structure and node content, then they arecalled
14. What is the time complexity of the dynamic programming implementation of the longest common subsequence problem where length of one string is "m" and the length of the other string is "n" ?
15. The number of edges from the root to the node is called ..... of the tree.
16. What method in Python is used to remove the last element from a list?
17. A B-tree of order 4 and of height 3 will have a maximum of ..... keys.
18. Arrays have a fixed number of items.True or False
19. (A) Non primitive data structures are more complex data structures.(R) Non primitive data structures are derived from the user defined data structure
20. ..... technique doesn't give guarantee that our solution is optimal
21. Assertion(A):A tree is non-linear data structure. Reason (R):In non-linear data structure data items are connected to many other data items.
22. Which of the following are the tree traversal
23. Which of the following data structures is best suited for implementing a stack?
24. What is a nonlinear data structure? Provide an example.
25. What does the following function do for a given Linked List with first node as head?void fun1(struct node* head)\{ if(head == NULL) return; fun1(head$\rightarrow$next); printf("%d ", head$\rightarrow$data);\}
26. Collection of similar type of data item is called
27. In AVL tree, the balance factor of a node is defined as the difference between the heights of its left and right subtrees. What is the range of the balance factor for a node in a balanced AVL tree?
28. 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.
29. What is the name given to an abstract representation of how data is stored in a 2D array?
30. Pop() method does .....
31. Which of the following is not a disadvantage to the usage of array?
32. What is the output of the following code:'print((1, 2) + (3, 4))'?
33. What are the key characteristics of tuples in Python?
34. How do sets differ from lists in Python?
35. What are the advantages of using a binary tree over a linked list?
36. Which of following data structure is more appropriate forimplementing quick sort iteratively?
37. Stack uses ..... data structure as the element that was inserted last is the first one to be taken out.
38. How do you create a lambda function in Python?
39. What happens if you try to access a key that doesn't exist in a Python dictionary?Criterion 2:Apply reasoning to solve real-world problems in various contexts
40. Priority Queues can be implemented in Java using the PriorityQueue class from the ..... package.
41. What does the following code snippet do? void solve(ListNode* node) \{ node = node $\rightarrow$ next;\}
42. What is the number of moves required to solve Tower of Hanoi problem for k disks?
43. In a singly linked list, what does each node contain?
44. *The evaluation of the above postfix expression is
45. How do you access the first element of a nested dictionary?
46. A function calls itself is called .....
47. Under which situation is the Enum data structure used?
48. What is the height of a binary tree with only one node (the root)?
49. Which of the following is/are the levels of implementation of data structure
50. How do you access the second element of a tuple?
51. What is the purpose of the quicksort algorithm?
52. Based on the following statements, which are the leaf nodes?ArrayList minHeap = new ArrayList<>();Collections.addAll(minHeap, 2, 4, 5, 7, 8);
53. A binary search tree whose left subtree and right subtree differ in height by at most 1 unit is called
54. Data structure can be of two types namely .....
55. Give an example of a primitive data structure in Python.
56. Other name for directed graph is .....
57. How do you create a set?
58. For the activity 'Counting vowels in a sentence' that uses 'for loop within the function', what is the most efficient approach?
59. Example of non linear data structure
60. It is a type of queue where elements are processed based on their order either natural or custom.