The outer ``for'' loop at iteration j has data[0] through data[j-1] sorted.
The inner ``for'' loop slides the next item into its place.