Class 12 Computer Science Chapter 1 Data Structures Using Python Quiz 3 (60 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?
26. Which of the following options is not true about the Binary Search tree?
27. What is the output of the expression len({1, 2, 3})?
28. Stack Operations always performs
29. ..... operation adds an element to the top of the stack.
30. What is a python set?
31. Each key can map to several values.
32. Discuss the concept of nested lists in Python with an example.
33. Which one of the following is the overflow condition if a circular queue is implemented using array having size MAX?
34. Which of the following is NOT a valid use case for a priority queue?
35. What kind of data structure is user ..... data in the following declaration? user ..... data = ["TJ", 24, "artLover123"]
36. How do you iterate over the keys of a dictionary using a for loop?
37. In the following scenarios, when will you use selection sort?
38. What is the value of the postfix expression 6 3 2 4 +-*:
39. What is the data structure used to perform recursion?
40. A graph is a tree if and only if graph is
41. Which of the following statements about arrays is true?
42. In dynamic programming, the technique of storing the previously calculated values is called .....
43. What is the base case in a recursive function?
44. ..... the condition indicate the queue is empty.
45. This stores its elements in a hash table without a guaranteed order upon iteration.
46. ..... is an example of non linear data structure
47. Set A = { 1, 3, 5, 7 }Set B = { 2, 3, 4, 5 }The difference of sets A and B (A-B) is ..... ?
48. What is the purpose of the 'in' keyword in Python?
49. What is the purpose of the reduce function?
50. In java, array elements are stored in ..... memory locations
51. What is the purpose of the reduce function in Python?
52. Act of adding values into a stack is called
53. Explain the concept of recursion in programming.
54. What should be the value of rear (end) if the queue is full (elements are completely occupied )?
55. Minimum nodes possible height for a AVL tree with 16 nodes
56. Which of the following is the most widely used external memory data structure?
57. Can dictionary keys be of any data type?
58. In which algorithm takes less time or space is called
59. Which situation is best for using a tuple?
60. How can you check if an item exists in a tuple in Python?