Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Mareš
prm2
Commits
a1b6b935
Commit
a1b6b935
authored
May 13, 2020
by
Martin Mareš
Browse files
RaP: Komentáře
parent
a68c9a46
Changes
3
Hide whitespace changes
Inline
Side-by-side
11-rozdel-a-panuj/mergesort.py
View file @
a1b6b935
#!/usr/bin/python3
# Třídicí algoritmus Mergesort
def
merge
(
x
,
y
):
"""Slévání dvou setříděných posloupností."''
i = j = 0
out = []
...
...
11-rozdel-a-panuj/quickselect.py
View file @
a1b6b935
#!/usr/bin/python3
# Výběr k-tého nejmenšího prvku algoritmem Quickselect
def
quickselect
(
x
,
k
):
...
...
11-rozdel-a-panuj/quicksort.py
View file @
a1b6b935
#!/usr/bin/python3
# Třídění algoritmem Quicksort
# Tato verze je optimalizovná na přímočarost: oproti Quicksortu
# z přednášky nepřehazuje prvky na místě a místo toho si je zkopíruje.
# Je tak lépe vidět, co se děje, ale stojí nás to linearně paměti navíc.
def
quicksort
(
x
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment