Assessment Details
● Assessment Title: Examination
● Weighting: 100%
● No of MCQ Questions: 20 (Part I)
● No of Structured Questions: 3 (Part II)
● Total Marks: 100
● Time Duration: 3 Hours
Instructions
● Answer all questions.
● Write all answers in the question paper.
● Calculators are not permitted.
● Closed book examination.
● Written examination.
PART I – MCQ QUESTIONS
(20 × 1 Marks = 20 Marks)
Choose the correct answer.
1. Which data structure works on the FIFO principle?
A) Stack
B) Queue
C) Tree
D) Graph
2. Which operation removes an element from a Stack?
A) Push
B) Insert
C) Pop
D) Enqueue
3. Which data structure is best for implementing Undo operations?
A) Queue
B) Tree
C) Stack
D) Graph
4. Which searching algorithm requires the array to be sorted?
A) Linear Search
B) Binary Search
C) DFS
D) BFS
5. What is the worst-case time complexity of Bubble Sort?
A) O(log n)
B) O(n)
C) O(n²)
D) O(1)
6. Which traversal method visits the Left subtree, Root, then Right
subtree?
A) Preorder
B) Postorder
C) Inorder
D) BFS
7. Which data structure allows insertion and deletion at both ends?
A) Stack
B) Queue
C) Deque
D) Array
8. What is the root node in a tree?
A) Node with no children
B) Top-most node
C) Last node
D) Middle node
9. Which algorithm uses Divide and Conquer strategy?
A) Bubble Sort
B) Merge Sort
C) Linear Search
D) Selection Sort
10. Which data structure is commonly used for BFS traversal?
A) Stack
B) Queue
C) Array
D) Heap
11. Which data structure stores key-value pairs?
A) Stack
B) Queue
C) Hash Table
D) Linked List
12. Which of the following is a non-linear data structure?
A) Array
B) Stack
C) Queue
D) Tree
13. What is the default value of an int array element in Java?
A) null
B) 0
C) undefined
D) 1
14. Which sorting algorithm repeatedly selects the smallest element?
A) Bubble Sort
B) Quick Sort
C) Selection Sort
D) Merge Sort
15. Which traversal algorithm uses recursion naturally?
A) BFS
B) DFS
C) Binary Search
D) Linear Search
16. What is the time complexity of Binary Search?
A) O(n²)
B) O(n)
C) O(log n)
D) O(1)
17. Which linked list allows traversal in both directions?
A) Singly Linked List
B) Circular Linked List
C) Doubly Linked List
D) Array List
18. Which operation adds an element into a Queue?
A) Pop
B) Push
C) Enqueue
D) Delete
19. What is recursion?
A) Looping without conditions
B) A function calling itself
C) Searching technique
D) Sorting technique
20. What will the following code print?
Queue<Integer> q = new LinkedList<>();
[Link](10);
[Link](20);
[Link]([Link]());
A) 10
B) 20
C) null
D) Error
PART II – STRUCTURED QUESTIONS
Task 1 – Marks 20 (LO1)
SmartBank ATM Transaction System
SmartBank is developing an ATM transaction management system. Customers perform
transactions such as:
● Cash deposits
● Withdrawals
● Balance inquiries
The system processes transactions in the exact order they are received.
Tasks
1. Identify the most suitable data structure for managing ATM transactions.
2. Explain the operations of the selected data structure.
3. Evaluate advantages and disadvantages of the selected data structure.
4. Explain real-world applications of the selected data structure.
5. Support your answer with suitable examples.
Task 2 – Marks 30 (LO2, LO4)
CityTech Online Bookshop – Product Management
System
CityTech Online Bookshop plans to develop a Java application to manage product IDs.
Program Requirements
1. Create a Java class with a main method.
2. Create an integer array and initialize it with sample product IDs.
3. Create a method to print array values.
4. Create a method to sort product IDs using Bubble Sort.
5. Create a method to search product IDs using Binary Search.
6. Display search results appropriately.
Tasks
1. Write the complete Java program.
2. Explain how Bubble Sort works.
3. Explain the working process of Binary Search.
4. Evaluate the time complexity of:
○ Bubble Sort
○ Binary Search
Task 3 – Marks 30 (LO2, LO3, LO4)
SocialNet Communication Platform
SocialNet is developing a social media platform where:
● Users are connected as friends
● Users can follow multiple users
● Friend suggestions are generated automatically
Tasks
1. Identify the most suitable data structure for representing user connections.
2. Explain:
○ Graph
○ Vertices
○ Edges
3. Explain the difference between:
○ Directed Graph
○ Undirected Graph
4. Explain:
○ BFS Traversal
○ DFS Traversal
5. Evaluate advantages and disadvantages of Graph data structures.
6. Explain real-world applications of Graphs with examples.