• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 12 pages
Exam (elaborations)

CSE310 Exam 2 2025 Questions and Answers

Document preview thumbnail
Preview 2 out of 12 pages

CSE310 Exam 2 2025 Questions and Answers

Content preview

CSE310 Exam 2 2025 Questions and
Answers


Minimum and Maximum - ANSWER-Requires Θ(n) in all cases. Faster to run

both simultaneously rather than separately.

Selecting iᵗʰ Smallest - ANSWER-Average-case of Θ(n).

Worst-case of Θ(n²).

Binary Search Tree - ANSWER-Worst Case:

Θ(lg n) to add

ΘIlg n) to retrieve

Direct Address Table - ANSWER-A table that has a single location for every

possible value to be stored.

Pros of Direct Address Table - ANSWER-Searching and retrieving takes a

constant amount of time.




Only look in one location.




COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 1

, Requires Θ(1) to store or retrieve.

Cons of Direct Address Table - ANSWER-Requires storage for every possible

value, not just the actual number of values needed.




Storage has to be initialized, which takes Θ(n) due to the fact that n is the number

of possible values.

Hash Table - ANSWER-A data structure that stores values similar to a direct

addressing table with fewer options for where elements can go which keeps storage

requirements down, but still needs to have enough memory to store all of the

values. A hash function 𝘩 is used to determine which location in the table an

element goes in.

Independent Uniform Hashing - ANSWER-An ideal hash will appear to randomly

assign each element to any given hash table location with equal probability (has to

be deterministic so that the location is the same for an element every time).

Pros of Independent Uniform Hashing - ANSWER-Requires less storage than a

direct addressing table.




Don't need to come up with a different hash function for each data set.



COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 2

Document information

Uploaded on
August 17, 2025
Number of pages
12
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.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
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.
KatelynWhitman
3.6
(260)
Sold
1255
Followers
485
Items
43943
Last sold
11 hours 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