Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
itt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lukas Nagel
itt
Merge requests
!2
An error occurred while fetching the assigned milestone of the selected merge_request.
Example
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Example
example
into
master
Overview
0
Commits
3
Pipelines
1
Changes
15
Merged
Example
Lukas Nagel
requested to merge
example
into
master
Dec 2, 2021
Overview
0
Commits
3
Pipelines
1
Changes
15
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
5f3189d6
3 commits,
Dec 2, 2021
15 files
+
461
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
15
example/workdir/.versions/algo.py.bob
0 → 100644
+
23
−
0
View file @ 5f3189d6
Edit in single-file editor
Open in Web IDE
#!/bin/env python3
from
random
import
shuffle
inf
=
float
(
'
inf
'
)
def
is_sorted
(
lst
):
pass
def
sort
(
lst
):
"
Sorts a list in place with a best case performance of O(n)
"
lst
.
sort
()
while
not
is_sorted
(
lst
):
shuffle
(
lst
)
if
__name__
==
"
__main__
"
:
to_sort
=
list
(
range
(
0
,
10
))
shuffle
(
to_sort
)
print
(
"
Unsorted:
"
,
to_sort
)
sort
(
to_sort
)
print
(
"
Sorted:
"
,
to_sort
)
Loading