It's one thing to be vague, it's a lot worse to be specific when nothing is specified.
Swap makes sense when you're talking about two things. When you're talking about thee things, there are five ways to swap them not counting leaving them as they are.
Rotate is more helpful, yet there are two directions that something can be rotated in.
Yet it takes memory to swap things so it's really crazy to do repeat rotations. It's more sensible to put something in one place and move one or two things at a time. And then move the outstanding item after everything is else is in place.
With insertion sort, a 'hole' my be used while other elements are moved one at a time to make room for insertion.
I may post some improved pseudo code to help with project 5.
In the meantime. I hope it you can look at 'swap' as clockwise rotation.
So clockwiseRotationWithIndexFunctionsMislablededAs'swap'(a,b,c)
means:
move list items from positions a->b->c->a
or in python, where L is list and a,b,c are indices.
(L[b],L[c],L[a]) = (L[a],L[b],L[c])
the ++ means increment first.
so CRWIFMA'swap'(a,b++,c)
is the same as
b = b+1
followed by
(L[b],L[c],L[a]) = (L[a],L[b],L[c])
Keep in mind that the whole point of pseudo code is to be understood by humans.