-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
237 lines (225 loc) · 9.64 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!doctype html>
<html lang="de">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Favicon -->
<link rel="icon" type="image/ico" href="assets/favicon/favicon.ico">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="dist/bootstrap/bootstrap.min.css"/>
<link rel="stylesheet" href="css/navbar.css"/>
<title>Algorithmen - online</title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<div class="container-fluid">
<span class="navbar-brand" href="#">Algorithmen - online</span>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" href="#">
Übersicht
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDarkDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Sortieren
</a>
<ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDarkDropdownMenuLink">
<li><a class="dropdown-item" href="sorting/selectionsort.html">SelectionSort</a></li>
<hr>
<li><a class="dropdown-item" href="sorting/gnomesort.html">GnomeSort</a></li>
<li><a class="dropdown-item" href="sorting/insertionsort.html">InsertionSort</a></li>
<li><a class="dropdown-item" href="sorting/bubblesort.html">BubbleSort</a></li>
<li><a class="dropdown-item" href="sorting/shakersort.html">ShakerSort</a></li>
<hr>
<li><a class="dropdown-item" href="sorting/quicksort.html">QuickSort</a></li>
<li><a class="dropdown-item" href="sorting/heapsort.html">HeapSort</a></li>
<hr>
<li><a class="dropdown-item" href="sorting/mergesort.html">2-Wege-MergeSort</a></li>
<li><a class="dropdown-item" href="sorting/straightmergesort.html">Reines 2-Wege-Mergesort</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDarkDropdownMenuLinkHashing" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Hashing
</a>
<ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDarkDropdownMenuLinkHashing">
<li><a class="dropdown-item" href="hashing/linearessondieren.html">Lineares Sondieren</a></li>
<li><a class="dropdown-item" href="hashing/quadratischessondieren.html">Quadratisches Sondieren</a></li>
<hr>
<li><a class="dropdown-item" href="hashing/doublehashing.html">Double Hashing</a></li>
<li><a class="dropdown-item" href="hashing/brentsalgorithmus.html">Brents Algorithmus</a></li>
<hr>
<li><a class="dropdown-item" href="hashing/kuckuckshashing.html">Kuckucks-Hashing</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDarkDropdownMenuLinkStringSearching" role="button" data-bs-toggle="dropdown" aria-expanded="false">
String Searching
</a>
<ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarDarkDropdownMenuLinkStringSearching">
<li><a class="dropdown-item" href="string-searching/naivesuche.html">Naive Suche</a></li>
<li><a class="dropdown-item" href="string-searching/knuthmorrispratt.html">Knuth-Morris-Pratt</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<main class="container content-center">
<!-- no javascript -->
<noscript>
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">JavaScript deaktiviert!</h4>
<hr>
<p>Algorithmen - online benötigt JavaScript um einwandfrei zu funktionieren.<br/>
Aktiviere Javascript und kehre auf die Seite zurück um den vollen Umfang der Seite zu nutzen.</p>
</div>
</noscript>
<h1>Übersicht</h1>
<hr>
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th scope="col">Sortieralgorithmus</th>
<th>Best-Case</th>
<th>Average-Case</th>
<th>Worst-Case</th>
</tr>
</thead>
<tbody>
<tr>
<td>SelectionSort</td>
<td><var><strong>O(n²)</strong></var></td>
<td><var><strong>O(n²)</strong></var></td>
<td><var><strong>O(n²)</strong></var></td>
</tr>
<tr>
<td>GnomeSort</td>
<td><var><strong>O(n)</strong></var></td>
<td><var><strong>O(n²)</strong></var></td>
<td><var><strong>O(n²)</strong></var></td>
</tr>
<tr>
<td>InsertionSort</td>
<td><var><strong>O(n)</strong></var></td>
<td><var><strong>O(n²)</strong></var></td>
<td><var><strong>O(n²)</strong></var></td>
</tr>
<tr>
<td>BubbleSort</td>
<td><var><strong>O(n)</strong></var></td>
<td><var><strong>O(n²)</strong></var></td>
<td><var><strong>O(n²)</strong></var></td>
</tr>
<tr>
<td>ShakerSort</td>
<td><var><strong>O(n)</strong></var></td>
<td><var><strong>O(n²)</strong></var></td>
<td><var><strong>O(n²)</strong></var></td>
</tr>
<tr>
<td>QuickSort</td>
<td><var><strong>O(n log(n))</</strong></var></td>
<td><var><strong>O(n log(n))</</strong></var></td>
<td><var><strong>O(n²)</strong></var></td>
</tr>
<tr>
<td>HeapSort</td>
<td><var><strong>O(n log(n)) + O(n)</</strong></var></td>
<td><var><strong>O(n log(n)) + O(n)</</strong></var></td>
<td><var><strong>O(n log(n)) + O(n)</strong></var></td>
</tr>
<tr>
<td>2-Wege-MergeSort</td>
<td><var><strong>O(n log(n))</</strong></var></td>
<td><var><strong>O(n log(n))</</strong></var></td>
<td><var><strong>O(n log(n))</strong></var></td>
</tr>
<tr>
<td>Reines 2-Wege-MergeSort</td>
<td><var><strong>O(n log(n))</</strong></var></td>
<td><var><strong>O(n log(n))</</strong></var></td>
<td><var><strong>O(n log(n))</strong></var></td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th scope="col">Hashingalgorithmus</th>
<th>Hashfunktion</th>
<th>Sondierungsfolge</th>
</tr>
</thead>
<tbody>
<tr>
<td>Lineares Sondieren</td>
<td><var><strong>k mod n</strong></var></td>
<td><var><strong>h(k), h(k) − 1, h(k) − 2, ..., 0, n − 1, ..., h(k) + 1</strong></var></td>
</tr>
<tr>
<td>Quadratisches Sondieren</td>
<td><var><strong>k mod n</strong></var></td>
<td><var><strong>h(k), (h(k) + 1) mod n, (h(k) − 1) mod n, (h(k) + 4) mod n, (h(k) − 4) mod n, ...</strong></var></td>
</tr>
<tr>
<td>Double Hashing</td>
<td><var><strong>h_0(k) := k mod n,<br/>h_1(k) := 1 + (k mod (n − 2)),<br/>n ist Primzahl</strong></var></td>
<td><var><strong>h_0(k), (h_0(k) − h_1(k)) mod n, (h_0(k) − 2 · h_1(k)) mod n, ..., (h_0(k) − (n − 1) · h_1(k)) mod n</strong></var></td>
</tr>
<tr>
<td>Brents Algorithmus</td>
<td><var><strong>h_0(k) := k mod n,<br/>h_1(k) := 1 + (k mod (n − 2)),<br/>n ist Primzahl</strong></var></td>
<td><var><strong>Versuche einfügen bei i := h_0(k), sonst<br/>
betrachte b_0 := (i - h_1(k)) mod n, sonst<br/>
betrachte b_1 := (i - h_1(k_1)) mod n, wobei k_1 := Schlüssel auf Position i, setze k auf Position i und k_1 auf Position b_1, sonst<br/>
wiederhole ab b_0 mit i := b.</strong></var></td>
</tr>
<tr>
<td>Kuckucks-Hashing</td>
<td><var><strong>h_0(k) := k mod n,<br/>h_1(k) := 1 + (k mod (n − 2)),<br/>n ist Primzahl</strong></var></td>
<td><var><strong>Versuche einfügen bei h_0(k) in T_0, sonst<br/>
betrachte h_1(k) in T_1, war der Platz in T_1 mit k_1 belegt, dann speichere k_1 bei h_0(k_1) in T_0, war der Platz in T_0 ebenfalls mit k_2 belegt, dann speichere k_2 bei h_1(k_2) in T_1, usw. ..,<br/>
kommt es dabei zu einem Zyklus bilde zwei neue größere Hashtabellen.</strong></var></td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th scope="col">String Searching Algorithmus</th>
<th>Laufzeit</th>
</tr>
</thead>
<tbody>
<tr>
<td>Naive Suche</td>
<td><var><strong>O(n · m)</strong></var></td>
</tr>
<tr>
<td>Knuth-Morris-Pratt</td>
<td><var><strong>O(n + m)</strong></var></td>
</tr>
</tbody>
</table>
</main>
<footer class="footer fixed-bottom mt-auto py-3 bg-light">
<div class="container text-center">
<span class="text-muted">
<a href="https://github.com/Ra-Coding/algorithmen-online/blob/main/LICENSE">MIT Lizenz</a> © 2021 Ra-Coding | Algorithmen - online auf <a href="https://github.com/Ra-Coding/algorithmen-online">Github
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-github" viewBox="0 0 16 16">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"/>
</svg>
</a>
</span>
</div>
</footer>
<script src="dist/bootstrap/bootstrap.bundle.min.js"></script>
</body>
</html>