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)

CMSC 256 Final Exam ACTUAL UPDATED QUESTIONS AND CORRECT ANSWERS

Rating
-
Sold
-
Pages
13
Grade
A+
Uploaded on
12-06-2026
Written in
2025/2026

CMSC 256 Final Exam ACTUAL UPDATED QUESTIONS AND CORRECT ANSWERS

Institution
CMSC
Course
CMSC

Content preview

CMSC 256 Final Exam ACTUAL UPDATED QUESTIONS AND CORRECT ANSWERS

- Addition (ALL) O(n) Sorted Array Based Implementations Worst Case Graphs
- Removal (Rats) O(n) - Addition
- Retrieval (Run) O(log n) - Removal
- Traversal (There) O(n) - Retrieval
- Traversal


A hash code and a compression function What parts does hashing consist of


Hashing is a technique in comp sci to efficiently store and What is hashing
retrieve data from memory using a unique identifier
called a hash code




- Unique Identifier generated from the input data Hash codes
- Used to store and retrieve data from memory
- Good Hash code should produce a unique code for
each input and be easy to compute


- A technique used to generate a hash code for a string What is Polynomial Accumulation


hash = s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]*31^0 Polynomial accumulation formula for strings
where s = string and n is the length of string


Technique used to handle cases where two different Collision Resolution
inputs produce the same hash code code


Chaining, Linear probing, quadratic probing, double Different collision strategies include :
hashing


Creates a linked list to store multiple values with the same What does the collision resolution strategy chaining do?
hash code


If there's a collision for the position of the key value then What does the collision resolution strategy Linear Probing do?
the linear probing technique assigns the next free space
to the value


Collision is resolved by finding the new position of the What does the collision resolution strategy Quadratic Probing do?
element to be inserted in hash table with the help of
quadratic probing hash function


it works by using two hash functions to compute two What does the collision resolution strategy Double hashing do?
different hash values for a given key, The first hash
function is used to compute the initial hash value, and the
second hash func is used to compute the step size for the
probing sequence

, Used to map the hash code to a specific index in.the hash compression function
table, should distribute the hash codes evenly across the
hash table to minimize collisions


A graph is a collection of vertices and edges, they What is a graph?
represent relationships between objects


are the objects represented in the graph (nodes) Vertices


are the connections between vertices (lines) edges


Directed and undirected graphs What are the different edge types?


have a value assigned to them Weighted edges


Have no value assigned to them Unweighted Edges


Vertices that are not connected to any other vertices Disconnected graphs


All vertices connected by at least one edge Connected Graphs




All vertices connected by an edge Complete Graphs


A closed path in the graph Cycle


A cycle with no repeated vertices Simple Cycle


A sequence of vertices connected by edges Path


A path with no repeated vertices Simple path


number of edges a vertex contains Degree


max number of edges in a graph with n vertices is n*(n- Maximum number of edges
1)/2.


Contain fewer edges than the maximum Sparse Graphs


close to the maximum number of edges Dense graphs

Written for

Institution
CMSC
Course
CMSC

Document information

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

Subjects

$17.09
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.
Briwisescore Stanford University
Follow You need to be logged in order to follow users or courses
Sold
20
Member since
2 year
Number of followers
5
Documents
9901
Last sold
1 week ago

1.7

3 reviews

5
0
4
0
3
1
2
0
1
2

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

Working on your references?

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

Working on your references?

Frequently asked questions