Help Python Sort Algorithm Javascript Interview