1.Which data structure is most suitable for implementing a priority queue?
- 1.Stack
- 2.Queue
- 3.Heap ✓
- 4.Linked List
2.What is the time complexity of searching for an element in a balanced binary search tree?
- 1.O(1)
- 2.O(log n) ✓
- 3.O(n)
- 4.O(n log n)
3.Which algorithm is used for finding the shortest path in a graph with non-negative weights?
- 1.Depth First Search
- 2.Breadth First Search
- 3.Dijkstra's Algorithm ✓
- 4.Kruskal's Algorithm
4.In terms of Big O notation, what is the complexity of the quicksort algorithm in the worst case?
- 1.O(n)
- 2.O(n^2) ✓
- 3.O(n log n)
- 4.O(log n)
5.Which sorting algorithm guarantees O(n log n) time complexity in worst-case scenario?
- 1.Bubble Sort
- 2.Quick Sort
- 3.Merge Sort ✓
- 4.Selection Sort
6.Which of the following is not a principle of Object-Oriented Programming?
- 1.Imperative Programming ✓
- 2.Encapsulation
- 3.Inheritance
- 4.Polymorphism
7.What is the result of executing a post-order traversal on a binary tree?
- 1.Visit root node, left subtree, right subtree
- 2.Visit left subtree, right subtree, root node ✓
- 3.Visit left subtree, root node, right subtree
- 4.Visit right subtree, root node, left subtree
8.In a graph, which algorithm is efficient for finding a Minimum Spanning Tree?
- 1.Dijkstra's Algorithm
- 2.Bellman-Ford Algorithm
- 3.Kruskal's Algorithm ✓
- 4.Floyd-Warshall Algorithm
9.Which of the following best describes the term 'latency'?
- 1.The amount of data that can be transferred over a network per second
- 2.The time delay experienced in a system ✓
- 3.The maximum data transfer rate of a network
- 4.The consistency in the rate of data flow over a network
10.What is a closure in Python?
- 1.A nested function that has access to variables of the enclosing function even after the enclosing function has finished execution ✓
- 2.A Python dictionary storing global variables
- 3.The area in memory where variables are stored in Python
- 4.A container for importing modules