Your school name
1st Year Computer Chapter 4 Test1st Year · Computer · Punjab (PTB)
Q1. Multiple choice questions (Attempt all · 10 × 1 = 10)
Which graph allows movement in only one direction between two nodes?
Which data structure has a root node and follows a hierarchy?
In Python, which data structure can be used to simulate a queue?
Lists are helpful in implementing which of the following?
What are the components of a graph?
Which of the following best represents a leaf node?
Which function is used to remove the first occurrence of an item from a list by value?
What is the function of edges in a tree?
Which traversal method is used when deleting a file system?
An operation that removes an item from the top of the stack:
Q2. Short questions (Attempt any 6 of 8 · 6 × 2 = 12)
What is a graph in data structures?
What is a vertex in a graph?
Which function is used to insert an item at a specific position in a list?
Name two basic operations performed on stack.
What is a list in Python?
What is the difference between enqueue( ) and dequeue( ).
What is a leaf in a tree structure?
What does it mean that Python lists have dynamic size?
Q3. Long questions (Attempt any 2 of 3 · 2 × 4 = 8)
Explain the operations on stack with real-life example and Python code.
Explain the lists are used in implementing stack and queue data structures, including their practical uses in computer science.
Explain the main types of graphs with examples. Also describe the key characteristics and properties of graphs.