enter the total amount if items to sort. only up to 460 items can fit on the screen at once general info: this is not real time. efficiency is measured by number of comparisons and rewrites. this is all my code. rules for making an algorithm like this: 1. thou shalt not detect the value of any item in the list ever (e.g. detecting the value of the 5th item) 2. thou shalt not add any items to the list that were not there before (e.g. adding 1 to the bottom. you can only add item numbers e.g. adding the first item to the list) credits to the youtube people who make sorting algorithm videos this is a variation on bubble sort
what do the variables mean: comparisons: total amount of times 2 items in the list have been compared rewrites: total times the output list is rewritten into the base list (total times the algorithm has run) upper bound of comparisons: self explanatory. the amount of comparisons will never go above this. calculated with triangle number of the items chosen items: total items chosen. also works as the upper bound for rewrites