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

Ch. 4 Computer Science 201 Data Structures & Algorithms Exam Questions with Answers.

Rating
-
Sold
-
Pages
3
Grade
A+
Uploaded on
12-04-2025
Written in
2024/2025

Ch. 4 Computer Science 201: Data Structures & Algorithms Exam Questions with Answers The ingredients in an algorithm are called: - Correct Answers: Inputs Instead of a list of steps, algorithms can be written using: - Correct Answers: Flowcharts with arrows to illustrate the journey A programming algorithm is like: - Correct Answers: A recipe An algorithm always leads to a(n): - Correct Answers: Solution An algorithm is written down as: - Correct Answers: A list of steps What is one major drawback of experimental analysis? - Correct Answers: Implementation of programs What are asymptotic notations? - Correct Answers: Notations that allow us to analyze an algorithm's running time by identifying its behavior as the input size for the algorithm increases. What is NOT an asymptotic notation? - Correct Answers: β If f(n) is the function then O(f(n)) = { g(n) : there exists c > 0 and n0 such that f(n) ≤ c.g(n) for all n > n0. } is true for which of the following symptotic notations ? - Correct Answers: Big Oh An experimental analysis depends on the _____ results, so an algorithm cannot be measured unless an _____ is implemented. - Correct Answers: output; equivalent program Kara's code includes a binary search operation. Which of the following functions would be optimal to test the execution time of this function? - Correct Answers: Log n An algorithm tests the air pressure on a slope at different altitudes. Given that the pressure depends on the altitude, what is the optimal algorithmic function to use? - Correct Answers: Linear In a linear function, the time taken is _____ if the size of the input is doubled. - Correct Answers: doubled Out of a random bunch of last years' holiday greeting cards, Clara wants to find the one her mother sent her. The optimal algorithm to use will be _____. - Correct Answers: N-log-N Brian has an algorithm to read through an array that contains numbers 1 through 26 and convert each number to an English alphabet. He runs the algorithm a number of times with no changes to the size of the array and no changes to the task done. The function to use is: _____ - Correct Answers: f(n) = c What is the time complexity of the following ? i=0;while(i<n){ j=i;while(j<n && j<i+5){ /* code */j++;}i=j; } - Correct Answers: O(N) If one for loop runs with size N and the other with size M and the loops follow a linear function, what is the expected time complexity? - Correct Answers: O(M+N) What is space complexity? - Correct Answers: Amount of storage an algorithm needs to work If an algorithm runs in quadratic time, what is its time complexity using Big-O ? - Correct Answers: O(N2) For a linear function, what would be its time complexity? - Correct Answers: O(N) Which method is used to prove a mathematical statement true, by assuming the negation of it to also be true? - Correct Answers: contrapositive In algorithm analysis, space complexity describes _____. - Correct Answers: the total memory space consumed In loop variants, the relationship between the variables _____. - Correct Answers: is the same before and after the loops Why is it necessary to analyze an algorithm? - Correct Answers: All of the above Contrapositive and contradiction fall under which category of algorithm analysis? - Correct Answers: Contra Attack

Show more Read less
Institution
Data Structures And Algorithm Analysis In C+
Course
Data Structures and Algorithm Analysis in C+








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

Written for

Institution
Data Structures and Algorithm Analysis in C+
Course
Data Structures and Algorithm Analysis in C+

Document information

Uploaded on
April 12, 2025
Number of pages
3
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Ch. 4 Computer Science 201:
Data Structures & Algorithms
Exam Questions with Answers
The ingredients in an algorithm are called: - Correct Answers: Inputs



Instead of a list of steps, algorithms can be written using: - Correct Answers: Flowcharts with arrows to
illustrate the journey



A programming algorithm is like: - Correct Answers: A recipe



An algorithm always leads to a(n): - Correct Answers: Solution



An algorithm is written down as: - Correct Answers: A list of steps



What is one major drawback of experimental analysis? - Correct Answers: Implementation of programs



What are asymptotic notations? - Correct Answers: Notations that allow us to analyze an algorithm's
running time by identifying its behavior as the input size for the algorithm increases.



What is NOT an asymptotic notation? - Correct Answers: β



If f(n) is the function then O(f(n)) = { g(n) : there exists c > 0 and n0 such that f(n) ≤ c.g(n) for all n > n0. }
is true for which of the following symptotic notations ? - Correct Answers: Big Oh



An experimental analysis depends on the _____ results, so an algorithm cannot be measured unless an
_____ is implemented. - Correct Answers: output; equivalent program



Kara's code includes a binary search operation. Which of the following functions would be optimal to
test the execution time of this function? - Correct Answers: Log n
$17.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
EXAMSTUVIA

Also available in package deal

Thumbnail
Package deal
Data Structures and Algorithm Analysis Bundle Compilation Grade A+
-
15 2025
$ 254.55 More info

Get to know the seller

Seller avatar
EXAMSTUVIA stuvia
View profile
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
1 year
Number of followers
2
Documents
1102
Last sold
3 months ago
Stuvia Exam

Assignments, Case Studies, Research, Essay writing service, Questions and Answers, Discussions etc. for students who want to see results twice as fast. I have done papers of various topics and complexities. I am punctual and always submit work on-deadline. I write engaging and informative content on all subjects. Send me your research papers, case studies, psychology papers, etc, and I’ll do them to the best of my abilities. Writing is my passion when it comes to academic work. I’ve got a good sense of structure and enjoy finding interesting ways to deliver information in any given paper. I love impressing clients with my work, and I am very punctual about deadlines. Send me your assignment and I’ll take it to the next level. I strive for my content to be of the highest quality. Your wishes come first— send me your requirements and I’ll make a piece of work with fresh ideas, consistent structure, and following the academic formatting rules. For every student you refer to me with an order that is completed and paid transparently, I will do one assignment for you, free of charge!!!!!!!!!!!!

Read more Read less
0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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