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

Algorithms Exam Questions and Answers Fully Solved Graded A+

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
03-08-2025
Written in
2025/2026

Algorithms Exam Questions and Answers Fully Solved Graded A+ Definition of an algorithm - Answersa sequence of unambiguous instructions for solving a problem (for obtaining a required output for any legitimate input in a finite amount of time) Requirements of an algorithm - Answers- Non-ambiguity (set of steps) - Carefully specified range of inputs - Output must be correct for anything in that range - It has to be completed in a finite amount of time Misc algorithm stuff - Answers- Same algorithm can be represented in several different ways - Several algorithms for solving the same problem may exist - May have dramatically different speeds GCD (Euclids Alg) - Answersinput: two integers m and n, >= 0 and not both 0 while n != 0 { r = m mod n m = n n = r } return m Steps for algorithm design - Answers1) Understand the problem 2) Figure out what your computer is capable of (sequential vs parallel) 3) Choose exact or approximate 4) Pick a data structure 5) Consider algorithm design techniques (Prove correctness, analyze algorithm, code it) Important problem types - Answers1) Sorting 2) Searching 3) String processing 4) Graph problems 5) Combinatorial 6) Geometric 7) Numeric Time Efficiency (Def) - AnswersHow fast an algorithm runs (easier to improve than space efficiency) Space Efficiency (Def) - AnswersHow much space an algorithm requires Basic Operation (Def) - AnswersThe most expensive most commonly used operation Order of Growth (order) - Answersc, log n, log (n^2), (log n) ^2, n^(1/3), n^(1/2), n, n (log n), n^2, n^3, 2^n, n! Is average case efficiency often (worst case + best case)/2? - AnswersNo Big Oh, O(g(n)) -meaning - AnswersSet of all functions with the same or smaller growth rates as g(n) Big Omega, Ω(g(n)) -meaning - AnswersSet of all functions with the same or greater growth rates than g(n) Big Theta, Θ(g(n)) -meaning - AnswersSet of all functions with the same order of growth as g(n) How do you prove big theta? - AnswersProve that big omega and big oh are of equal growth orders Big Oh, O(g(n)) -definition - Answersthere exists a positive constant (c) and a non-negative integer n0 such that

Show more Read less
Institution
Algorithms
Course
Algorithms









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

Written for

Institution
Algorithms
Course
Algorithms

Document information

Uploaded on
August 3, 2025
Number of pages
6
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Algorithms Exam Questions and Answers Fully Solved Graded A+

Definition of an algorithm - Answersa sequence of unambiguous instructions for solving a problem (for
obtaining a required output for any legitimate input in a finite amount of time)

Requirements of an algorithm - Answers- Non-ambiguity (set of steps)

- Carefully specified range of inputs

- Output must be correct for anything in that range

- It has to be completed in a finite amount of time

Misc algorithm stuff - Answers- Same algorithm can be represented in several different ways

- Several algorithms for solving the same problem may exist

- May have dramatically different speeds

GCD (Euclids Alg) - Answersinput: two integers m and n, >= 0 and not both 0



while n != 0 {

r = m mod n

m=n

n=r

}

return m

Steps for algorithm design - Answers1) Understand the problem

2) Figure out what your computer is capable of (sequential vs parallel)

3) Choose exact or approximate

4) Pick a data structure

5) Consider algorithm design techniques

(Prove correctness, analyze algorithm, code it)

Important problem types - Answers1) Sorting

2) Searching

, 3) String processing

4) Graph problems

5) Combinatorial

6) Geometric

7) Numeric

Time Efficiency (Def) - AnswersHow fast an algorithm runs (easier to improve than space efficiency)

Space Efficiency (Def) - AnswersHow much space an algorithm requires

Basic Operation (Def) - AnswersThe most expensive most commonly used operation

Order of Growth (order) - Answersc, log n, log (n^2), (log n) ^2, n^(1/3), n^(1/2), n, n (log n), n^2, n^3,
2^n, n!

Is average case efficiency often (worst case + best case)/2? - AnswersNo

Big Oh, O(g(n)) -meaning - AnswersSet of all functions with the same or smaller growth rates as g(n)

Big Omega, Ω(g(n)) -meaning - AnswersSet of all functions with the same or greater growth rates than
g(n)

Big Theta, Θ(g(n)) -meaning - AnswersSet of all functions with the same order of growth as g(n)

How do you prove big theta? - AnswersProve that big omega and big oh are of equal growth orders

Big Oh, O(g(n)) -definition - Answersthere exists a positive constant (c) and a non-negative integer n0
such that



t(n) <= c*g(n) for all n>= n0

Big Omega, Ω(g(n)) -definition - Answersthere exists a positive constant (c) and a non-negative integer
n0 such that



t(n) >= c*g(n) for all n>= n0

Big Theta, Θ(g(n)) -definition - Answersthere exists a positive constants (c1 and c2) and a non-negative
integer n0 such that

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.
TutorJosh Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
332
Member since
1 year
Number of followers
16
Documents
28211
Last sold
1 day ago
Tutor Joshua

Here You will find all Documents and Package Deals Offered By Tutor Joshua.

3.6

53 reviews

5
18
4
14
3
12
2
0
1
9

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