Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 15 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. How do you access values in a dictionary using keys?
2. How do you access elements in a two-dimensional list?
3. Which method adds a new key-value pair?
4. Data is a collection of
5. Consider the following statements in a Queue:enqueue(8); enqueue(2); enqueue(6); enqueue(4); dequeue();enqueue(5);What is the current size of the queue?
6. If for an algorithm time complexity is given by O(n) then complexityof it is:
7. Which of the following is an incorrect array declaration?
8. What does the following piece of code do?public void func(Tree root) \{ func(root.left()); func(root.right()); System.out.println(root.data()); \}
9. Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The binary search tree uses the usual ordering on natural numbers. What is the in-order traversal sequence of the resultant tree?
10. What is the significance of immutability in tuples?
11. The process of Visiting each element in any Data structure is termed as .....
12. Which one of the below mentioned is linear data structure?
13. Rotating a linked list by some places clockwise will take a time complexity of?
14. (A):Array is collection of homogenous elements.(B):Array is an example for non linear data structure.
15. A graph is a collection of nodes, called ..... And line segments called arcs or ..... that connect pair of nodes.
16. In a list l=[1, 2, 3, 6], what would be the output of val =l.pop()
17. State the meaning of "void" keyword:
18. If the insertion and deletion happens from both the ends then the queue is called a ..... Queue
19. Deletion from a stack is
20. Which data structure is used to check a palindrome?
21. A collection of elements where each element is unique.
22. What is a non-primitive data structure? Provide an example.
23. The number of edges in a complete graph of n vertices is .....
24. Array data can be accessed using .....
25. Complete the code so that it only prints numbers from 1 to 5.number = 1 while ..... :print(number) number += 1