100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

COMP 410 Final Exam Study Guide Questions and Answers 2024

Rating
-
Sold
-
Pages
17
Grade
A
Uploaded on
31-08-2024
Written in
2024/2025

A data structure is - a particular way of organizing data in a computer so that it can be used efficiently An Abstract Data Type is - A set of objects together with a set of operations (They are a mathematical abstraction) Common Trade-offs - Time vs Space Making one operation faster may make another operation slower Providing more operations (making the data structure more general) may make some operations less efficient Operations are revealed through? - Interfaces and methods Set of objects stored as? - private variables What are the benefits of using an ADT? - Code is easier to understand Implementations of ADTs can be changed ADTs can be reused in future programs Disadvantages of Arrays - Size is capped by a maximum or or requires resizing which is slow (Take time proportional to the length of the array) Inserting an item at the beginning or in the middle of the list is slow Linked List: get - Time: O(N) Linked List: Insertion - Time: O(1) Linked List: add - Time: O(1) Linked List: remove - Time: O(N) for first item What if you only want to remove the last item of a Linked List - Must update the "next" link of the next-to-last Node. Finding the next-to-last node requires following N links Array List vs Linked List (space) - Linked List is always proportional to the number of items in the list while Array List may be arbitrarily greater than number of elements (if removed used) Array List vs Linked List (time) - add (at end of list): AL O(N) (to copy the array); LL O(1) (when we maintain reference to the last node) add at a position: AL O(N) (to copy array); LL O(N) (to reach the position) get: AL O(1); LL O(N) to reach the position What if you want to iterate a link backwards (e.g listIous())? - Each call to previous() requires finding the previous Node Requires time proportional to N Doubly Linked List Double Linked List: Insertion How? - Create a Node Set 4 Link references Double Linked List: Insertion

Show more Read less










Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
August 31, 2024
Number of pages
17
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

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.
PossibleA Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
989
Member since
4 year
Number of followers
650
Documents
12762
Last sold
16 hours ago
POSSIBLEA QUALITY UPDATED EXAMS

Choose quality study materials for nursing schools to ensure success in your studies and future career. "Welcome to PossibleA - your perfect study assistant! Here you will find Quality sheets, study materials, exams, quizzes, tests, and notes to prepare for exams and study successfully. Our store offers a wide selection of materials on various subjects and difficulty levels, created by experienced teachers and checked for quality. Our quality sheets are an easy and quick way to remember key points and definitions. And our study materials, tests, and quizzes will help you absorb the material and prepare for exams. Our store also has notes and lecture summaries that will help you save time and make the learning process more efficient.

Read more Read less
3.9

142 reviews

5
74
4
25
3
21
2
1
1
21

Recently viewed by you

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

Frequently asked questions