|
127 | 127 | </tr>
|
128 | 128 | <tr>
|
129 | 129 | <th align="center">Best</th>
|
130 |
| - <th align="center">Avegage</th> |
| 130 | + <th align="center">Average</th> |
131 | 131 | <th align="center">Worst</th>
|
132 | 132 | <th align="center">Worst</th>
|
133 | 133 | </tr>
|
|
147 | 147 | </tr>
|
148 | 148 | <tr>
|
149 | 149 | <th align="center">Best</th>
|
150 |
| - <th align="center">Avegage</th> |
| 150 | + <th align="center">Average</th> |
151 | 151 | <th align="center">Worst</th>
|
152 | 152 | <th align="center">Worst</th>
|
153 | 153 | </tr>
|
|
167 | 167 | </tr>
|
168 | 168 | <tr>
|
169 | 169 | <th align="center">Best</th>
|
170 |
| - <th align="center">Avegage</th> |
| 170 | + <th align="center">Average</th> |
171 | 171 | <th align="center">Worst</th>
|
172 | 172 | <th align="center">Worst</th>
|
173 | 173 | </tr>
|
|
179 | 179 | </tr>
|
180 | 180 | </table>
|
181 | 181 | - Merge sort [Wikipedia](https://en.wikipedia.org/wiki/Merge_sort?oldformat=true)
|
182 |
| - - This is a "divide and conquer" algorithm, meaning it recursively "divides" given array in to smaller parts (up to 1 element) and then sorts those parts, combining them with each other. This approach allows merge sort to acieve very high speed, while doubling required space, of course, but today memory space is more availible than it was a couple of years ago, so this trade-off is considered acceptable. |
| 182 | + - This is a "divide and conquer" algorithm, meaning it recursively "divides" given array in to smaller parts (up to 1 element) and then sorts those parts, combining them with each other. This approach allows merge sort to achieve very high speed, while doubling required space, of course, but today memory space is more available than it was a couple of years ago, so this trade-off is considered acceptable. |
183 | 183 | <table>
|
184 | 184 | <tr>
|
185 | 185 | <th colspan="3" align="center">Time Complexity</th>
|
186 | 186 | <th align="center">Space Complexity</th>
|
187 | 187 | </tr>
|
188 | 188 | <tr>
|
189 | 189 | <th align="center">Best</th>
|
190 |
| - <th align="center">Avegage</th> |
| 190 | + <th align="center">Average</th> |
191 | 191 | <th align="center">Worst</th>
|
192 | 192 | <th align="center">Worst</th>
|
193 | 193 | </tr>
|
|
199 | 199 | </tr>
|
200 | 200 | </table>
|
201 | 201 | - Quicksort [Wikipedia](https://en.wikipedia.org/wiki/Quicksort?oldformat=true)
|
202 |
| - - Quicksort is considered, well, quite quick. When implemented correctly, it can be a significant number of times faster than its' main competitors. This algorithm is also of "divide and conquer" family and its' first step is to choose a "pivot" element (choosing it randomly, statistically, minimizes the chance to get the worst performance), then by comparing elements to this pivot, moving it closer and closer to its' final place. During this process, the elements that are bigger are moved to the right side of it and smaller elements to the left. After this is done, quicksort repeats this process for subarrays on each side of placed pivot (does first step recursively), until the array is sorted. |
| 202 | + - Quicksort is considered, well, quite quick. When implemented correctly, it can be a significant number of times faster than its' main competitors. This algorithm is also of "divide and conquer" family and its' first step is to choose a "pivot" element (choosing it randomly, statistically, minimizes the chance to get the worst performance), then by comparing elements to this pivot, moving it closer and closer to its' final place. During this process, the elements that are bigger are moved to the right side of it and smaller elements to the left. After this is done, quicksort repeats this process for subarrays on each side of placed pivot (does first step recursively), until the array is sorted. |
203 | 203 | <table>
|
204 | 204 | <tr>
|
205 | 205 | <th colspan="3" align="center">Time Complexity</th>
|
206 | 206 | <th align="center">Space Complexity</th>
|
207 | 207 | </tr>
|
208 | 208 | <tr>
|
209 | 209 | <th align="center">Best</th>
|
210 |
| - <th align="center">Avegage</th> |
| 210 | + <th align="center">Average</th> |
211 | 211 | <th align="center">Worst</th>
|
212 | 212 | <th align="center">Worst</th>
|
213 | 213 | </tr>
|
|
0 commit comments