Your school name
2nd Year Computer Chapter 2 Test2nd Year · Computer · Federal (FBISE)
Q1. Multiple choice questions (Attempt all · 10 × 1 = 10)
- The factorial function example demonstrates:
- Which of the following best describes a data structure?
- Arrays are efficient because:
- Each node of a linked list contains:
- Arrays are the simplest data structure used in:
- Adding an element to a queue is called:
- Circular linked list forms a:
- In a singly linked list, each node has:
- The bottom nodes in a tree are known as:
- In a doubly linked list, each node has:
Q2. Short questions (Attempt any 6 of 8 · 6 × 2 = 12)
- What are the two parts of a singly linked list node?
- What is clarity in an algorithm?
- What are arrays used for?
- Differentiate between connected and directed graph.
- What is the time complexity of Euclidean Algorithm?
- Define quadratic time complexity.
- What is a singly linked list?
- Which type of complexity does Merge Sort have?
Q3. Long questions (Attempt any 2 of 3 · 2 × 4 = 8)
- Describe the difference between Stack and Queue. How does their operation affect algorithm design? Provide one real-life example for each data structure.
- Compare and evaluate the efficiency of Bubble Sort and Merge Sort in sorting a list of 1,000 student names. Discuss in terms of time complexity and clarity. Which is more suitable and why?
- Explain the importance of tree traversal and its traversal techniques. Compare in-order traversal with examples and their use cases. Compare in-order, pre-order, and post-order traversal with examples and their use cases.