100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Samenvatting - iad1 $10.76
Add to cart

Summary

Samenvatting - iad1

 0 purchase
  • Course
  • Institution

Samenvatting van alle nuttige informatie van iad1 die je nodig hebt voor het tentamen

Preview 3 out of 25  pages

  • April 23, 2024
  • 25
  • 2023/2024
  • Summary
avatar-seller

Available practice questions

Flashcards 29 Flashcards
$4.83 0 sales

Some examples from this set of practice questions

1.

Wat is de complexiteit van bubble sort?

Answer: O(n^2)

2.

Wat is complexiteit van selection sort?

Answer: O(n^2)

3.

Wat is de worst case complexiteit van quick sort?

Answer: O(n^2)

4.

Wat is de worst case complexiteit van merge sort?

Answer: O(n log(n))

5.

Wat is de worst case complexiteit van heap sort?

Answer: O(n log(n))

6.

Sorteer 9, 5, 7, 2, 8, 4, 3 met selection sort

Answer: Je hebt steeds het kleinste getal vooraan gezet: 9, 5, 7, 2, 8, 4, 3 2, 5, 7, 9, 8, 4, 3 3, 7, 9, 8, 4, 5 4, 9, 8, 7, 5 5, 8, 7, 9 7, 8, 9 8, 9 9 Je hebt steeds het grootste getal achteraan gezet: 9, 5, 7, 2, 8, 4, 3 3, 5, 7, 2, 8, 4, 9 3, 5, 7, 2, 4, 8 3, 5, 4, 2, 7 3, 2, 4, 5 3, 2, 4 2, 3 2

7.

Sorteer 9, 5, 7, 2, 8, 4, 3 met quick sort

Answer: Je kiest steeds het laatste getal als pivot: 9, 5, 7, 2, 8, 4, 3 2, |3|, 9, 5, 7, 8, 4 |2|, |3|, |4|, 9, 5, 7, 8 |2|, |3|, |4|, 5, 7, |8|, 9 |2|, |3|, |4|, 5, |7|, |8|, |9| |2|, |3|, |4|, |5|, |7|, |8|, |9| Je kiest steeds het eerste getal als de pivot: 9, 5, 7, 2, 8, 4, 3 5, 7, 2, 8, 4, 3, |9| 2, 4, 3|5|, 7, 8, |9| |2|, 4, 3, |5|, |7|, 8, |9| |2|, 3, |4|, |5|, |7|, |8|, |9| |2|, |3|, |4|, |5|, |7|, |8|, |9|

8.

Sorteer [15, 8, 10, 5, 7, 6] met heap sort

Answer: Begin met max-heap uitgetekend: 15 10 8 5 7 6 3 Tussen stap: [10, 15] 8 7 6 5 Tussen stap: [7, 8, 10, 15] 6 5 Einde: [5, 6, 7, 8, 10, 15]

9.

Hoe bereken je de load factor van een hash table

Answer: load factor = aantal elementen / aantal plekken in de hash table

10.

Hoe ontstaan collisions in een hash table en op welke manieren kun je colliosions oplossen?

Answer: Collisions ontstaan als een key-value paar een hash waarde krijgt die al gevuld is in de tabel. De collision is op te lossen met lineair probin en separate chaining

IAD1 samenvatting
Inhoudsopgave
Week 1....................................................................................................................................................2
1.2 Big O.............................................................................................................................................2
1.4 Big O code logaritmisch................................................................................................................3
1.5 big O code recursief......................................................................................................................3
1.6 Sorteren........................................................................................................................................4
1.7 Selection sort................................................................................................................................5
Week 2....................................................................................................................................................6
2.1 Quicksort......................................................................................................................................6
2.2 Quicksort voorbeeld.....................................................................................................................7
2.3 Heapsort.......................................................................................................................................7
2.4 Heapsort voorbeeld......................................................................................................................8
Week 3....................................................................................................................................................9
3.1 Hash Table....................................................................................................................................9
3.2 Hashfunctie.................................................................................................................................11
Week 4..................................................................................................................................................12
4.1 Boom & binaire zoekboom.........................................................................................................12
4.2 AVL boom....................................................................................................................................13
4.3 AVL Rotaties................................................................................................................................14
4.4 AVL voorbeeld.............................................................................................................................14
Week 5..................................................................................................................................................15
5.1 Graaf...........................................................................................................................................15
5.2 Graaf programmeren..................................................................................................................16
5.3 Zoeken in een graaf.....................................................................................................................17
5.4 DFS voorbeeld.............................................................................................................................18
5.5 BFS voorbeeld.............................................................................................................................18
5.6 Dijkstra........................................................................................................................................19
5.7 Dijkstra voorbeeld.......................................................................................................................19
Week 6..................................................................................................................................................20
6.1 compressie-algoritmen...............................................................................................................20
6.2 compressie Huffman...................................................................................................................21
6.3 Compressie LZW (Lempel-Ziv-Welch)..........................................................................................23

,Week 1
1.2 Big O
Big-O notatie: Een manier om over de performance van een algoritme te praten.
Het gaat dan over de worst-case complexiteit (in ruimte of tijd)

De complexiteit bepaald je door te kijken hoeveel stapjes de code doet.
Je neemt voor de Big-O notatie de grootste n




Figuur 1: Doorlooptijd voor algoritme, n = 100

, 1.4 Big O code logaritmisch
Kwadratisch = O(N^2) -> 2 for-loops
Kubisch = O(N^3) -> 3 for-loops

Logaritmisch -> deel elke keer je stappen/elementen door 2
Bijv. binair zoeken



1.5 big O code recursief
Lineair -> 1 for-loop

Recursive: je functie roept zichzelf opnieuw aan

Exponentieel -> (2^n) – duurt veel langer dan lineair

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Informatica. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $10.76. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

62774 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 15 years now

Start selling
$10.76
  • (0)
Add to cart
Added