100% tevredenheidsgarantie Direct beschikbaar na betaling Zowel online als in PDF Je zit nergens aan vast
logo-home
Data Structures and Algorithms Qs & As €8,10   In winkelwagen

Tentamen (uitwerkingen)

Data Structures and Algorithms Qs & As

 3 keer bekeken  0 keer verkocht
  • Vak
  • Data Structures and Algorithms
  • Instelling
  • Data Structures And Algorithms

Data Structures and Algorithms A linked-list implementation of a stack guarantees constant time performance but requires more space than an array implementation. - Answer- TRUE Both implementations of pop and push guarantee constant time performance. Linked lists require additional memory (spac...

[Meer zien]

Voorbeeld 1 van de 2  pagina's

  • 18 augustus 2024
  • 2
  • 2024/2025
  • Tentamen (uitwerkingen)
  • Vragen en antwoorden
  • Data Structures and Algorithms
  • Data Structures and Algorithms
avatar-seller
Data Structures and Algorithms
A linked-list implementation of a stack guarantees constant time performance but
requires more space than an array implementation. - Answer- TRUE
Both implementations of pop and push guarantee constant time performance. Linked
lists require additional memory (space) for storing a reference to the next node.

An algorithm that uses 12n2 + 4n log n operations is a ∼n2 algorithm. - Answer-
FALSE
It is a ∼ 12n2 algorithm.

Big-Oh notation is more precise than tilde notation at describing the growth of a
function. - Answer- FALSE
Big-Oh notation only provides an upper bound on the growth rate of a function. Tilde
approximation approaches the original function as N grows.

When implementing the Comparable interface, you should make sure that your
implementation of the compareTo() method specifies a total order over the objects. -
Answer- TRUE
When implementing the Comparable interface, you should make sure that your
implementation of the compareTo() method specifies a total order over the objects.

Mergesort - Answer- Stable and fast

Quicksort - Answer- Fast general-purpose sort

Shellsort - Answer- Not analyzed

Insertion sort - Answer- Works well with order

Selection sort - Answer- Optimal data movement

3-way quicksort - Answer- Works well with duplicates

Heapsort - Answer- Optimal time and space

Height of a binary heap with N keys. - Answer- log N

A binary heap is a complete tree. A complete tree is a tree with n levels, where for
each level d ≤ n − 1, the number of existing nodes at level d is equal to 2d. The
height of a binary heap is logN.

Height of a BST with N keys. - Answer- N

In the worst-case, the height of a BST is N, e.g., when keys are inserted in
increasing or de- creasing order.

Voordelen van het kopen van samenvattingen bij Stuvia op een rij:

Verzekerd van kwaliteit door reviews

Verzekerd van kwaliteit door reviews

Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!

Snel en makkelijk kopen

Snel en makkelijk kopen

Je betaalt supersnel en eenmalig met iDeal, creditcard of Stuvia-tegoed voor de samenvatting. Zonder lidmaatschap.

Focus op de essentie

Focus op de essentie

Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper Freshy. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor €8,10. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 82956 samenvattingen verkocht

Opgericht in 2010, al 14 jaar dé plek om samenvattingen te kopen

Start met verkopen
€8,10
  • (0)
  Kopen