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
Exam (elaborations)

VERSION 2 DATA STRUCTURES AND ALGORITHMS I 2026 TEST PAPER SOLVED QUESTIONS AND SOLUTIONS

Rating
-
Sold
-
Pages
18
Grade
A+
Uploaded on
13-04-2026
Written in
2025/2026

VERSION 2 DATA STRUCTURES AND ALGORITHMS I 2026 TEST PAPER SOLVED QUESTIONS AND SOLUTIONS

Institution
DATA
Course
DATA

Content preview

VERSION 2 DATA STRUCTURES AND
ALGORITHMS I 2026 TEST PAPER SOLVED
QUESTIONS AND SOLUTIONS

◉ Max-heap remove. Answer: Always a removal of the root, and is
done by replacing the root with the last level's last node, and
swapping that node with its greatest child until no max-heap
property violation occurs.
Complexity O(logN)


◉ Percolating. Answer: The upward movement of a node in a max-
heap


◉ Min-Heap. Answer: Similar to a max-heap, but a node's key is less
than or equal to its children's keys.


◉ Linked list vs Array. Answer: If a program requires fast insertion
of new data, a linked list is a better choice than an array.


◉ Abstract Data Type (ADT). Answer: A data type described by
predefined user operations, such as "insert data at rear," without
indicating how each operation is implemented.

,◉ List. Answer: An ADT for holding ordered data.


Data Structure Types: Array, linked list


◉ Tuple. Answer: Array Type
An immutable(fixed) container with ordered elements.


◉ Stack. Answer: An ADT in which items are only inserted on or
removed from the top of a stack.
*Last-in First-Out


Underlying data structures: Linked list


Push(stack, x), pop(stack), peek(stack), IsEmpty(stack),
GetLength(stack)


*Pop & peek should not be used on a empty stack.


◉ Stack operations. Answer: Example starting with stack: 99, 77
(top is 99).


Push(stack, x)

, Inserts x on top of stack
Push(stack, 44). Stack: 44, 99, 77


Pop(stack)
Returns and removes item at top of stack
Pop(stack) returns: 99. Stack: 77


Peek(stack)
Returns but does not remove item at top of stack
Peek(stack) returns 99. Stack still: 99, 77


IsEmpty(stack)
Returns true if stack has no items
IsEmpty(stack) returns false.


GetLength(stack)
Returns the number of items in the stack
GetLength(stack) returns 2.


◉ Queue. Answer: An ADT in which items are inserted at the end of
the queue and removed from the front of the queue.

Written for

Institution
DATA
Course
DATA

Document information

Uploaded on
April 13, 2026
Number of pages
18
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$13.99
Get access to the full document:

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

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ProfessorBeatrice Havard School
View profile
Follow You need to be logged in order to follow users or courses
Sold
15
Member since
4 months
Number of followers
0
Documents
6410
Last sold
1 day ago
Professor_Beatrice7

I believe learning isn’t just about cramming it’s about clarity, growth, and building the confidence to conquer any challenge. That’s why you’ll find a handpicked collection of top notch, easy to digest study materials, smart summaries, and guides tailored to a wide range of subjects and learning styles. Whether you're gearing up for exams, brushing up on class notes, or just need that extra push, I have you covered. From quick-reference sheets to deep-dive notes, there’s something here for every learner. Think of this place as a place where productivity meets peace of mind. So settle in and let’s sharpen your focus and fuel your success, one file at a time. Thanks for making me your study partner. Let’s unlock your full potential together!

Read more Read less
5.0

1 reviews

5
1
4
0
3
0
2
0
1
0

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