100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

Quiz 5B Questions DSA Questions with Solutions

Beoordeling
-
Verkocht
-
Pagina's
4
Cijfer
A+
Geüpload op
29-08-2024
Geschreven in
2024/2025

Quiz 5B Questions DSA

Instelling
DSA
Vak
DSA

Voorbeeld van de inhoud

Quiz 5B Questions DSA

In Binary Search, the best case occurs when: - answer The item is located in the middle
of the collection.

For linear or sequential search, the average case time performance is: - answer O(n)

In Binary Search, the worst case occurs when: (select all that apply) - answer The item
is not in the collection.
The item is located at the very beginning of the collection.
The item is located at the end of the collection.

Which of the following statements about QuickSort and Mergesort are true?
A. Mergesort is not an example of the divide and conquer algorithm design strategy
because it only does Θ(1) work to divide the problem into two subproblems.
B. Quicksort has a better space-complexity than mergesort because partition() has
space-complexity of Θ(1) while merge() has space-complexity of Θ(n).
C. Both sorts can be made into hybrid sorts by using a non-recursive sort like insertion
sort to process subproblems smaller than a certain size. - answerB and C are true

Which of the following is NOT true about using the compareTo() method in Java to sort
things? - answerYou could rewrite the body of your compareTo() method in order to sort
a list in descending order instead of ascending order.

Assume values is an array of integers that is currently filled to capacity, with the
following values:
9 4 12 2 6 8 18
Which of the following lists of numbers would accurately show the array after the fourth
pass of Insertion sort? - answer2, 4, 6, 9, 12, 8, 18

A vector contains the numbers <7, 2, 9, 5, 4, 1> and Insertion Sort is run on this list.
Which of the following list orderings will never occur during any step of the sorting
process? We are only concerned with the state of the list at the beginning of each
iteration of the outer loop (after each element is fully "inserted"). - answer2, 7, 9, 4, 5, 1

Assume values is an array of integers that is currently filled to capacity, with the
following values:
9 4 12 2 6 8 18
Which of the following lists of numbers would accurately show the array after the fourth
pass of Selection sort? - answer2, 4, 6, 8, 12, 9, 18

Geschreven voor

Instelling
DSA
Vak
DSA

Documentinformatie

Geüpload op
29 augustus 2024
Aantal pagina's
4
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Dreamer252 NBursing
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
485
Lid sinds
3 jaar
Aantal volgers
297
Documenten
21392
Laatst verkocht
3 dagen geleden

4.0

118 beoordelingen

5
63
4
22
3
18
2
2
1
13

Populaire documenten

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen