Geschrieben von Student*innen, die bestanden haben Sofort verfügbar nach Zahlung Online lesen oder als PDF Falsches Dokument? Kostenlos tauschen 4,6 TrustPilot
logo-home
Prüfung

Data Structures and Algorithms

Bewertung
-
Verkauft
-
seiten
15
Klasse
A+
Hochgeladen auf
13-06-2025
geschrieben in
2024/2025

Data Structures and Algorithms

Hochschule
Graduation In Computer Science
Kurs
Graduation in computer science

Inhaltsvorschau

CS2336 Midterm ReViEw

If the expression (n - 2)*(n - 4) describes the performance of an algorithm, which of the
following correctly states the algorithm's performance?

A. None of the other options correctly describes the algorithm's performance.
B. O(8)
C. O(1)
D. O(n)
E. O(log n) - Correct Answers-A.
None of the other options correctly describes the algorithm's performance.

What term is used to describe an O(n) algorithm?

A. Constant
B. Quadratic
C. Logarithmic
D. Linear - Correct Answers-D.
Linear

Which tool can help the programmer produce nicely formatted and professional quality
documentation?

A. sublime
B. Libre Office Write
C. pydoc and/or javadoc
D. vim and gvim - Correct Answers-C. pydoc and/or javadoc

Why is writing easily modifiable code important?

A. Easily modifiable code generally has a quicker run time.
B. Most real world programs require change at some time.
C. Several people may be writing the same function at the same time.
D. Most text editors make it easy to modify code. - Correct Answers-B. Most real world
programs require change at some time.

Which of the following formulas in big-O notation best match the expression n²+35n+6 that was
derived from an analysis of a code segment processing n items of data?

, A. O(n³)
B. O(n)
C. O(42)
D. O(n²) - Correct Answers-D. O(n²)

Given the following equivalent code snippets in Java and Python, what is the worst time
behavior expressed in big O notation, assuming n is an integer variable?

// Java
while ( n > 0 ) {
n = n / 10 //integer division
}

# Python
while n > 0:
n = n // 10 # integer division
#end while

A. O(n)
B. O(n²)
C. O(1)
D. O(log10 n) - Correct Answers-D. O(log10 n)

When a method is called, who is responsible for ensuring that the precondition is valid?

A. The person who is using the program.
B. The programmer who wrote the method.
C. The programmer who implemented the Java or Python Runtime System.
D. The programmer who called the method. - Correct Answers-D. The programmer who called
the method.

Which of these is the correct big-O expression for performing the operations 1+2+3+...+n?

A. O(n)
B. O(n²)
C. O(log n)
D. O(n log n) - Correct Answers-A. O(n)

What information do you need to know or read in order to make effective use of a method

Schule, Studium & Fach

Hochschule
Graduation in computer science
Kurs
Graduation in computer science

Dokument Information

Hochgeladen auf
13. juni 2025
Anzahl der Seiten
15
geschrieben in
2024/2025
Typ
Prüfung
Enthält
Fragen & Antworten

Themen

11,14 €
Vollständigen Zugriff auf das Dokument erhalten:

Falsches Dokument? Kostenlos tauschen Innerhalb von 14 Tagen nach dem Kauf und vor dem Herunterladen kannst du ein anderes Dokument wählen. Du kannst den Betrag einfach neu ausgeben.
Geschrieben von Student*innen, die bestanden haben
Sofort verfügbar nach Zahlung
Online lesen oder als PDF

Lerne den Verkäufer kennen
Seller avatar
phil3

Ebenfalls erhältlich im paket-deal

Lerne den Verkäufer kennen

Seller avatar
phil3 stuvia
Folgen Sie müssen sich einloggen, um Studenten oder Kursen zu folgen.
Verkauft
-
Mitglied seit
9 Jahren
Anzahl der Follower
0
Dokumente
222
Zuletzt verkauft
-
A+ QuickPass exam packs.

Get real nursing exam questions with certified answers. Perfect for quick revision and exam prep. Clear, accurate and easy to use. Package deals also available with 50 % offer. Study smart, pass fast!

0,0

0 rezensionen

5
0
4
0
3
0
2
0
1
0

Kürzlich von dir angesehen.

Warum sich Studierende für Stuvia entscheiden

on Mitstudent*innen erstellt, durch Bewertungen verifiziert

Geschrieben von Student*innen, die bestanden haben und bewertet von anderen, die diese Studiendokumente verwendet haben.

Nicht zufrieden? Wähle ein anderes Dokument

Kein Problem! Du kannst direkt ein anderes Dokument wählen, das besser zu dem passt, was du suchst.

Bezahle wie du möchtest, fange sofort an zu lernen

Kein Abonnement, keine Verpflichtungen. Bezahle wie gewohnt per Kreditkarte oder Sofort und lade dein PDF-Dokument sofort herunter.

Student with book image

“Gekauft, heruntergeladen und bestanden. So einfach kann es sein.”

Alisha Student

Häufig gestellte Fragen