
Matthew K. answered 07/01/22
B.A. in Computer Science, Swarthmore College
Let the input to the flowchart be the list of numbers {F,S,U,W,V}. Let the "boxes" of the flowchart to route input(s) to output(s) based on rules and the properties of the input(s). Allow the "pipes" of the flowchart to transfer either one or more than one number at a time from one box to another. Think about the steps you would need to take to determine whether two numbers need to have their order swapped, then extrapolate that to the rest of the numbers. Repeat this swap functionality until you're certain the flowchart has been sorted. You can model loops in a flowchart by having a set of pipes eventually lead back to the same box.
It can be helpful to try sorting the list on your own, only allowing yourself to rewrite two elements at a given time. This way, you'll be practicing the same steps as the flowchart.