Exam1-Justin-Exam

.pdf

School

University of Maryland, College Park *

*We aren’t endorsed by this school

Course

351

Subject

Computer Science

Date

Feb 20, 2024

Type

pdf

Pages

8

Uploaded by SargentClover11186

Report
CMSC351 Fall 2022 Exam 1 Justin’s Section NAME (Neatly): UID (Neatly): Instructions: Please do all problems on the pages and in the spaces provided. This exam will be scanned into Gradescope and if your answers are not in the correct locations they will not be found or graded!
. THIS PAGE INTENTIONALLY LEFT BLANK! DO NOT USE!
1. Fill in the following as True or False . Any answers that are unclear will be marked as [10 pts] incorrect. Statement True/False Bubble Sort is best-case Θ(1). If f ( n ) ̸ = Ω( n 2 ) then f ( n ) = O ( n 2 ). Selection Sort is stable. Kadane’s Algorithm is Ω( n ). A Θ( n ) algorithm is always faster than a Θ( n 2 ) algorithm. 2. Suppose Kadane’s algorithm is run on a list of length 7. The values of maxendingati are given [5 pts] in the table below. Fill in the values of maxoverall . i maxendingati maxoverall 0 4 1 1 2 3 3 -1 4 8 5 13 6 12
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help