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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Consider the usual algorithm for determining whether a sequence of parentheses is balanced.Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order).The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation?
2. Array can be classified in how many types?
3. ..... is very useful in situation when data have to stored and then retrieved in reverse order.
4. What is the time complexity of deleting from the rear end of the dequeue implemented with a singly linked list?
5. What is the advantage of using a priority queue over a regular queue?
6. What will this code do? colors[1] = "yellow"
7. How do you access elements in a tuple?
8. What is the difference between a list and a dictionary?
9. How do you check if a variable is equal to a specific value using if-else?
10. For the 'Calculating Percent Markup' activity, what validation should the function include?
11. How do you append an element to a list in Python?
12. B-tree and AVL tree have the same worst case time complexity for insertion and deletion.
13. What is a two-dimensional array visualized as?
14. What is the time complexity to insert an element to the front of a LinkedList(head pointer given)?
15. Root has more left descendants than the right descendants or vice versa.
16. Which data structure is suitable for implementing a breadth-first search algorithm?
17. Which of the following is not an advantage of trees?
18. What is the purpose of the del statement in Python?
19. In a graph if E=(u, v) means .....
20. Pushing an element into stack already having five elements and stack size of 5, then stack becomes
21. Which of the following is the disadvantage of the array?
22. What are the main differences between a list and a set in Python?
23. What is a tuple?
24. Main Operations in Stacks are Called
25. Three standards ways of traversing a binary tree T with root R .....
26. Scores = [5, 7, 0, 10, 8, 3, 7, 3]Which value will be found using the following statement:print(scores[2])
27. What is the significance of the head and tail in a linked list?
28. What is the purpose of the 'with' statement in Python?
29. What will be the output of this program?a = 2**3*5+(10-1)*9
30. Name and explain two common sorting algorithms.
31. What is the output of the following code:for i in range(5):print(i)?
32. What does the following code do? public Object function() { if(isEmpty()) return-999; else { Object high; high = q[front]; return high; } }
33. How do you create a tuple?
34. In the 'Counting Words in a sentence' activity using len(), what preprocessing step would be most important?
35. How can we initialize an array in C language?
36. A map can contain duplicate keys.
37. In algorithm comment use by ..... brackets.
38. How can you remove an item from a dictionary?
39. Queue uses ..... for adding and deleting elements.
40. Which of the following represents the Postorder Traversal of a Binary Tree?
41. What is an AVL tree?
42. Which of the following operations is used to add an element to a queue?
43. How do you add a new key-value pair to a dictionary?
44. Every stack has a variable ..... associated with it.
45. Arranging the books in order and removing from the topmost book is an example for .....
46. The format identifier '%i' is also used for ..... data type.
47. Which of the following statements are not correct with respect to Singly Linked List(SLL) and Doubly Linked List(DLL)?
48. A container which can hold a fix number of items and these items should be of the same type. Most of the data structures make use of arrays to implement their algorithms.
49. The examples of Linear Data Structures are
50. Which type of array is the following example?score = [5, 7, 0, 10, 8, 3, 7, 3]
51. In which situation would you use a stack for evaluating an expression?
52. What is meant by 'declaring' an array?
53. What kind of linked list is best to answer question like "What is the item at position n?"
54. In algorithm variable names should be in capital letters.
55. Describe the characteristics of a stack data structure.
56. How do you convert a list to a set?
57. What operation would you use to add an element to a queue in Python?
58. Which of the following is false about a binary search tree?
59. Which data structure in Python is used to store key-value pairs?
60. How do you remove a key-value pair from a dictionary?