Correct bug for empty or length 1 arrays (bubble, selection, insertion, and Shell).