Let's say I am to sort a bookcase given a certain sorting condition, for instance alphabetically. I am looking for a way to generate a step-by-step guide on how to do this sorting based on the original order, as well as the final order. Original order:B C A DFinal order:A B C DGenerated step by step instructions (by index):0 -> 20 -> 2The problem is, of course, each step will alter the sorting order, requiring the algorithm to take into account the new state of each order. Is there such an algorithm readily available?
Algorithm for generating sorting instructions
algorithms;sorting