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

Quiz Instructions

Select an option to see the correct answer instantly.

1. If the front pointer in a circular queue is at index 0 and the rear pointer is at index n-1, what is the length of the queue?
2. Tree is a specific form of .....
3. If l=[23, 4, 56, 78] and top=len(l)-1 what would be l[top]?
4. Undo/Redo is implemented using .....
5. What does the .values() function do in Python Dictionaries?
6. Which of the following is not the type of queue?
7. If the size of the stack is 10 and we try to add the 11th element in the stack then the condition is known as .....
8. Which of the following operations is performed more efficiently by doubly linked list than by singly linked list?
9. What will happen if you try to add a duplicate item to a set?
10. In stack insertion and deletion can take place only at one end call the ..... of the stack.
11. What will be the output of the following code:if x > 10:print('High') else:print('Low')?
12. What method in Python is used to sort elements in a list in ascending order?
13. Which of the following is true about the memory allocation for arrays?
14. In a list l=[2, 5, 8, 1] after pop an element what would be len(l)
15. Consider a job scheduling problem with 4 jobs J$_{1}$, J$_{2}$, J$_{3}$, J$_{4}$ and with corresponding deadlines:( d$_{1}$, d$_{2}$, d$_{3}$, d$_{4}$) = (4, 2, 4, 2). Which of the following is not a feasible schedule without violating any job schedule?
16. Which statement determine whether a map contains the value "Pre-final" with the PF identifier?
17. Which of the following data structures can be used for parentheses matching?
18. Colours = ['red', 'blue', 'yellow', 'green', 'purple']Which instruction illustrates mutability?
19. Why do we use data structure in programming language?
20. Data in the data structures are processed by operations like insertion, deletion, sorting, merging and
21. When does the ArrayIndexOutOfBoundsException occur?
22. User perform following operations on stack of size 5 then-push(1);pop();push(2);push(3);pop();push(2);pop();pop();push(4);pop();pop();push(5);
23. In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is (GATE CS 2002)
24. The operation of processing each element in the list is known as
25. When should you use a dictionary?
26. In Python, which operator is used for exponentiation?
27. What are the main characteristics of a set?
28. TREE[1]=NULL indicates is .....
29. Explain how to loop through a dictionary in Python.
30. ..... is a way to represent data in memory.
31. In which situation is a queue most commonly used?
32. ..... operation changes the value of element given by user of the stack.
33. A queue follows .....
34. Which is an attribute?
35. In the context of the activity 'Checking Even Numbers', what logical structure would most likely be implemented within the function?
36. Algorithm is a ..... procedure.
37. Insertion in Queue is done at ..... end, and deletion is at ..... end
38. The decision tree structure begins at a node called the .....
39. Evaluate and write the result for the following postfix expressionabc*+de*f+g*+ where a=1, b=2, c=3, d=4, e=5, f=6, g=2.
40. A data structure whose elements form a sequence is known as
41. Which data structure in Python does not allow duplicate elements?
42. How do you access values in a dictionary using keys?
43. How do you access elements in a two-dimensional list?
44. Which method adds a new key-value pair?
45. Data is a collection of
46. 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?
47. If for an algorithm time complexity is given by O(n) then complexityof it is:
48. Which of the following is an incorrect array declaration?
49. What does the following piece of code do?public void func(Tree root) { func(root.left()); func(root.right()); System.out.println(root.data()); }
50. 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?
51. What is the significance of immutability in tuples?
52. The process of Visiting each element in any Data structure is termed as .....
53. Which one of the below mentioned is linear data structure?
54. Rotating a linked list by some places clockwise will take a time complexity of?
55. (A):Array is collection of homogenous elements.(B):Array is an example for non linear data structure.
56. A graph is a collection of nodes, called ..... And line segments called arcs or ..... that connect pair of nodes.
57. In a list l=[1, 2, 3, 6], what would be the output of val =l.pop()
58. State the meaning of "void" keyword:
59. If the insertion and deletion happens from both the ends then the queue is called a ..... Queue
60. Deletion from a stack is