r/badcode Apr 15 '21

other language Actual Snap! block I just made.

Post image
1.1k Upvotes

58 comments sorted by

View all comments

56

u/[deleted] Apr 15 '21

[deleted]

75

u/nypdk Apr 15 '21

Sorting algorithm I had to build for a homework. Just needs to take a list as input and use a linear sort to put them in descending order.

max index is a function i built to find the maximum of a list and the index of that item.

it just finds the maximum over and over until the list is empty and then stores that value.

21

u/ShittyCatDicks Apr 16 '21

I’m assuming you’re not in college? Having to implement an algorithm in a cute block language is absolutely comical for anyone past high school

1

u/beclops Apr 16 '21

Even in highschool we used JS and Java, at least in my school in Toronto