Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 22 pages
Exam (elaborations)

DATA STRUCTURES AND ALGORITHMS REVIEW. | FROM QUESTION TO PERFECTION| STUDY WITH CONFIDENCE!

Document preview thumbnail
Preview 3 out of 22 pages

DATA STRUCTURES AND ALGORITHMS REVIEW. | FROM QUESTION TO PERFECTION| STUDY WITH CONFIDENCE!

Content preview

DATA STRUCTURES AND ALGORITHMS REVIEW. | FROM
QUESTION TO PERFECTION| STUDY WITH CONFIDENCE!

Course Code:
Course Title:
Programme:
Academic Year: 2026/2027
Duration: 2 Hours
Total Marks: 70%


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

,runtime error, wherein a program's syntax is correct but the program attempts an impossible
operation, such as dividing by zero or multiplying strings together (like 'Hello' * 'ABC').
Answer: A runtime error halts the execution of the program. Abrupt and unintended termination
of a program is often called a crash of the program.
NP-complete problems are a Answer: set of problems for which no known efficient algorithm
exists. NP-complete problems have the following characteristics:
No efficient algorithm has found been to solve an NP-complete problem.
No one has proven that an efficient algorithm to solve an NP-complete problem is impossible.
If an efficient algorithm exists for one NP-complete problem, then all NP-complete problem can
be solved efficiently.
An abstract data type (ADT) is a data type described by predefined user operations, such as
"insert data at rear," without indicating how each operation is implemented. Answer: It does not
specify how data will be organized in memory and what algorithms will be used for
implementing the operations.
Ex: A list is a common ADT for holding ordered data, having operations like append a data item,
remove a data item, search whether a data item exists, and print the list. A list ADT is commonly
implemented using arrays or linked list data structures.
how is an abstract data type and a data structure different from each other? Answer: Simply put,
an ADT (Abstract Data Type) is more of a logical description, while a Data Structure is
concrete.
Think of an ADT as a picture of the data and the operations to manipulate and change it.
A Data Structure is the the real, concrete thing. It can be implemented and used within an
algorithm.
Common ADTs
ADT:
List
Description:
A list is an ADT for holding ordered data.
Common underlying data structures:
Array, linked list Answer: Stack
A stack is an ADT in which items are only inserted on or removed from the top of a stack.
Linked list



APPHIA – Crafted with Care and Precision for Academic Excellence.
2

, Queue
A queue is an ADT in which items are inserted at the end of the queue and removed from the
front of the queue.
Linked list Answer: Deque
A deque (pronounced "deck" and short for double-ended queue) is an ADT in which items can
be inserted and removed at both the front and back.
Linked list
Bag
A bag is an ADT for storing items in which the order does not matter and duplicate items are
allowed.
Array, linked list Answer: Set
A set is an ADT for a collection of distinct items.
Binary search tree, hash table
Priority queue
A priority queue is a queue where each item has a priority, and items with higher priority are
closer to the front of the queue than items with lower priority.
Heap Answer: Dictionary (Map)
A dictionary is an ADT that associates (or maps) keys with values.
Hash table, binary search tree
List abstract data type Answer: A list is a common ADT for holding ordered data, having
operations like append a data item, remove a data item, search whether a data item exists, and
print the list. Ex: For a given list item, after "Append 7", "Append 9", and "Append 5", then
"Print" will print (7, 9, 5) in that order, and "Search 8" would indicate item not found.
Common list ADT operations Answer: Operation
Description
Example starting with list: 99, 77
Append(list, x)
Inserts x at end of list
Append(list, 44), list: 99, 77, 44
Prepend(list, x)
Inserts x at start of list
Prepend(list, 44), list: 44, 99, 77


APPHIA – Crafted with Care and Precision for Academic Excellence.
3

Document information

Uploaded on
August 17, 2026
Number of pages
22
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$15.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Apphia
3.0
(2)
Sold
5
Followers
0
Items
3652
Last sold
2 weeks ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions