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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What are hash tables and how do they work?
2. What is the advantage of a hash table as a data structure?
3. The result of evaluating the postfix expression 5, 4, 6, +, *, 4, 9, 3, /, +, * is
4. What is a data structure?
5. Linked list is considered as an example of ..... type of memory allocation.
6. In linked list implementation of a queue, where does a new element be inserted?
7. Which of the following is useful in traversing a given graph by breadth first search?
8. What will the output of the following code snippet?void solve() \{ int a[] = \{1, 2, 3, 4, 5\}; int sum = 0; for(int i = 0; i < 5; i++) \{ if(i % 2 == 0) \{ sum += *(a + i); \} else \{ sum-= *(a + i); \} \} cout << sum << endl;\}
9. Which of the following is an example of a constant in Python?
10. How may index numbers are used in accessing a 2D array?
11. N elements of a Queue are to be reversed using another queue. The number of "ADD" and "REMOVE"operations required to do so is:
12. Which of these tree traversal methods is used to output the contents of a binary tree in ascending order?
13. With what data structure can a priority queue be implemented?
14. In this type of search, a sequential search is made over all items one by one.
15. What do you call a collection of items stored at contiguous memory locations?
16. How do you implement a queue using two stacks?
17. Heap can be used as .....
18. 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);
19. For the 'Calculating Distance' activity that uses 'input() function', what data type conversion is most likely needed?
20. The no of external nodes in a full binary tree with n internal nodes is?
21. How can you check if a key exists in a dictionary?
22. Can I remove a element from a tuple once created?
23. Which data structure is best for storing matrices?
24. Below is a stack operationint x = a[top ..... ]; return x;if top becomes zero, then what is that condition called?
25. Which of the following is NOT a Type of Data Structures?