C
de
S
pace
Explore
Log In
Explore
Sign Up
Log In
logansmith252
22.05.2026 11:35
0
Habit tracker
Work in progress
models.py
def factorial(n): if n == 0: return 1 return n * factorial(n-1) print(factorial(5))
helper.py
def bubble_sort(arr): n = len(arr) for i in range(n): for j in range(0, n-i-1): if arr[j] > arr[j+1]: arr[j], arr[j+1] = arr[j+1], arr[j] return arr print(bubble_sort([5, 3, 8, 1, 2]))
Idle
Try It
Clear
Log in
to leave a comment
Are you sure you want to delete this post?
Delete
Cancel