Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 25 pages
Summary

Samenvatting - iad1

Document preview thumbnail
Preview 3 out of 25 pages

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

Content preview

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

Document information

Study
Uploaded on
April 23, 2024
Number of pages
25
Written in
2023/2024
Type
Summary
$12.54

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
1
Followers
1
Items
9
Last sold
2 year ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions