DATA STRUCTURES AND ALGORITHMS | FROM QUESTION
TO PERFECTION| STUDY WITH CONFIDENCE!
Course Code:
Course Title: DATA STRUCTURES & ALGORITHMS.
Programme:
Academic Year: 2026/2027
Duration: 2 Hours
Total Marks: 100
Candidate Instructions:
1) Write your Registration Number on every answer booklet used.
2) Answer ALL questions in Section A and ANY TWO (2) questions in
Section B.
3) Read each question carefully before answering.
4) Begin each question on a new page.
5) The marks for each question are indicated in brackets.
6) This paper consists of several printed pages, including this page.
7) Ensure your copy is complete before the examination begins.
8) Unauthorized materials and communication with other candidates are not
permitted.
Turn Over.
APPHIA – Crafted with Care and Precision for Academic Excellence.
1
, What is a data structure? Answer: An arrangement of data inside a computers memory or a disk.
Name 5 data types Answer: BLASH: binary trees, linked lists, arrays, stacks, hash tables
What do algorithms do? Answer: Manipulate the data in data structures in various ways such as
sorting.
What is real-world storage data? Answer: Data structure storage that describes physical entities
external to the computer. Accessed by a programs user.
What are programmer's tools? Answer: Data structure storage that is accessed by the program
itself. Ex - stacks and queues.
What is real-world modeling? Answer: Data structures that directly model real-world
situations...think graphs.
What is an object? Answer: A software bundle of variables and related methods.
What is a class? Answer: A blueprint that defines an objects variables and methods.
The keyword "new" is used to do what? Answer: Create a new object in Java.
An object is often referred to as: Answer: An instance of a class.
object.method(); is and example of Answer: Invoking a method for a specific object.
Execution of the program starts where? Answer: main()
To create an object in Java you must do two things: Answer: 1. Use the keyword "new"
2. Store a reference to the object in a variable that is the same type as the class.
So:
Object = new ClassReference();
How do other parts of your program interact with objects? Answer: By interacting with an
objects methods
What is a constructor? Answer: A special method that is called automatically whenever a new
object is created. It prepares the object for use.
How is the constructor named? Answer: It has the same name as the class it resides in.
A field of method that is private can only be accessed by Answer: Methods that are apart of the
same class.
Any outside entity that wants to access data in a class can do so by: Answer: Using a method of
that class.
What must be added to all input methods for them to work? Answer: throws IOException
What does the charAt() method do? Answer: Returns a character at the specific position in the
string object.
APPHIA – Crafted with Care and Precision for Academic Excellence.
2
TO PERFECTION| STUDY WITH CONFIDENCE!
Course Code:
Course Title: DATA STRUCTURES & ALGORITHMS.
Programme:
Academic Year: 2026/2027
Duration: 2 Hours
Total Marks: 100
Candidate Instructions:
1) Write your Registration Number on every answer booklet used.
2) Answer ALL questions in Section A and ANY TWO (2) questions in
Section B.
3) Read each question carefully before answering.
4) Begin each question on a new page.
5) The marks for each question are indicated in brackets.
6) This paper consists of several printed pages, including this page.
7) Ensure your copy is complete before the examination begins.
8) Unauthorized materials and communication with other candidates are not
permitted.
Turn Over.
APPHIA – Crafted with Care and Precision for Academic Excellence.
1
, What is a data structure? Answer: An arrangement of data inside a computers memory or a disk.
Name 5 data types Answer: BLASH: binary trees, linked lists, arrays, stacks, hash tables
What do algorithms do? Answer: Manipulate the data in data structures in various ways such as
sorting.
What is real-world storage data? Answer: Data structure storage that describes physical entities
external to the computer. Accessed by a programs user.
What are programmer's tools? Answer: Data structure storage that is accessed by the program
itself. Ex - stacks and queues.
What is real-world modeling? Answer: Data structures that directly model real-world
situations...think graphs.
What is an object? Answer: A software bundle of variables and related methods.
What is a class? Answer: A blueprint that defines an objects variables and methods.
The keyword "new" is used to do what? Answer: Create a new object in Java.
An object is often referred to as: Answer: An instance of a class.
object.method(); is and example of Answer: Invoking a method for a specific object.
Execution of the program starts where? Answer: main()
To create an object in Java you must do two things: Answer: 1. Use the keyword "new"
2. Store a reference to the object in a variable that is the same type as the class.
So:
Object = new ClassReference();
How do other parts of your program interact with objects? Answer: By interacting with an
objects methods
What is a constructor? Answer: A special method that is called automatically whenever a new
object is created. It prepares the object for use.
How is the constructor named? Answer: It has the same name as the class it resides in.
A field of method that is private can only be accessed by Answer: Methods that are apart of the
same class.
Any outside entity that wants to access data in a class can do so by: Answer: Using a method of
that class.
What must be added to all input methods for them to work? Answer: throws IOException
What does the charAt() method do? Answer: Returns a character at the specific position in the
string object.
APPHIA – Crafted with Care and Precision for Academic Excellence.
2