Without help, write a bubble sort in C

Without help, write a bubble sort in C.

Attached: Capture+_2018-11-22-14-12-55.png (583x262, 21K)

Other urls found in this thread:

en.cppreference.com/w/cpp/algorithm/is_sorted
youtube.com/watch?v=F75vDo2Wx-E
stackoverflow.com/a/1810295
twitter.com/AnonBabble

I don't know how

brainlet

>He can't into homework assignment. Do something else with your life brainlet.

def bubblesort(lst):
while not (lst[0] == min(lst) and lst[-1] == max(lst)):
for i in range(len(lst) - 1):
if lst[i] > lst[i + 1]:
lst[i], lst[i + 1] = lst[i + 1], lst[i]
return lst

There's C underneath. What do I win?

You just did some guys homework for him. Probably an intro class to. How is he suppose to learn?

i'd have to look up what bubble sort is since i never filled my head with terrible algos
this won't sort anything that begins with the lowest element and ends with the greatest element

see >this won't sort anything that begins with the lowest element and ends with the greatest element

That's his todo.

t. the great educator

> write a bubble sort in C
Do my homework
> Without help
Don't copy it from stackoverflow because it will be obvious

based and mentorpilled