This is an algorithm that I wrote for implementation of bubble sort. It can also sort codes that are with the number, for example if you had an AI produce a set of scores and codes to produce that score it would sort it to out so the code that made the highest score is last. It is quickest with smaller data sets and is not a particularly efficient algorithm but is is very simple to code.