Bubble sort and median locator | ScratchStats