Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Lesson 5 part b
#python 3.5.2 import time # In ascending order # Bubble Sort # Selection Sort # Insertion Sort # sorted unsorted part # Example: [ 54 | {26}, 93, 17, 77, 31 ] # sorted unsorted # -------> [ 26, 54 | 93, 17, 77, 31 ] # -------> [ 26, 54, 93 | 17, 77, 31 ] # -------> [ 17, 26, 54, 93 | 77, 31 ] # Idea: Split the list into 2 parts - sorted and unsorted part # Take the first element in "unsorted part" and # Analyze its location in the "sorted part" # Hints: 1 outer for loop (for picking the first element in unsorted) # and inside 1 inner while loop (sorting analysis) # Homeworks # 1. Bubble sort in descending order (for/while) # 2. Selection sort in descending order (for/while) # 3. Try to (roughly) implement Insertion sort
run
|
edit
|
history
|
help
0
POO I EN PYTHON 3
vbcb
time module sleep localtime
Itc
String Toggling
shuru3
RCM Distributor info.
Tryme4.py
multiple inheritance
Reverse function