Skip to content

Instantly share code, notes, and snippets.

import random
import threading
import time
# Credits to Martmists (Martmists#3740) for counting sort, slow sort, pigeonhole sort, and radix sort code.
def bubble_sort(seq):
for i in range(len(seq)):
for j in range(len(seq)-i-1):
if seq[j] > seq[j+1]: