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)

DETAILED COMP SCI 2103 Alg exam Notes

Rating
-
Sold
-
Pages
4
Grade
A+
Uploaded on
21-06-2025
Written in
2024/2025

Dynamic arrays are stored in contiguous memory locations.The array is dynamically adjusted to accommodate for the size. When we create a list, it holds references (pointers) to objects rather than the raw data itself. These objects can be of all data types. Linked List are stored in nodes in memory. How Linked List works is that each node contains a pointer to the next node in the sequence. Linked lists are inherently dynamic data structures, they rely on new and delete for their operation. While arrays solely need to store the data values, linked lists must store not only the data values but also memory addresses stored in each pointer. ADT example Allin .h (no .cpp) or Recursion vs Iterative Loop The use of recursion does have implications for space usage at runtime. This is primarily due to the way the call stack works in B C++. When a function is called in a program, a new stack frame is created and added (pushed) onto the call stack. This stack frame contains information such as functions local variables, parameters and then the return address. When a recursive function is called, it keeps calling itself, adding a new stack frame to the call stack and for each recursive call it means more memory is needed before reaching its base case Tail - Recursion : The recursive call is the last operation in the function. This means that the compiler or interpreter can optimize tail recursion by reusing the existing stack frame for il each recursive call, rather than creating a new one. This can significantly reduce the space complexity of the recursive function and prevent stack overflow errors for very deep recursion. "‘'o ents. end( t = (); // if true, contain _‘Un el . m::fu(cm] "’W,M 0d(), elene Dynamic arrays are stored in contiguous memory locations.The array is dynamically adjusted to accommodate for the size. When we create a list, it holds references (pointers) to objects rather than the raw data itself. These objects can be of all data types. Linked List are stored in nodes in memory. How Linked List works is that each node contains a pointer to the next node in the sequence. Linked lists are inherently dynamic data structures, they rely on new and delete for their operation. While arrays solely need to store the data values, linked lists must stor

Show more Read less
Institution
COMP SCI 2103
Course
COMP SCI 2103

Content preview

Reverse Digit and
Selection Sort Bubble Sort string




Binary Search
- int m, int r) {




Stack and Queue



LIFO: Stack
- FIFO: Queues




Replace stack with queue
and change to Q
1(): Adds element
an ";to.flae:mpoffin'
k




abstractions.

Written for

Institution
COMP SCI 2103
Course
COMP SCI 2103

Document information

Uploaded on
June 21, 2025
Number of pages
4
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.49
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.
Abbyy01 Exam Questions
Follow You need to be logged in order to follow users or courses
Sold
96
Member since
4 year
Number of followers
33
Documents
1337
Last sold
5 days ago

3.5

13 reviews

5
5
4
2
3
3
2
1
1
2

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