You can
put this solution on YOUR website!
We can choose the flag to put on the top position 4 ways.
For each of those 4 ways to put a flag on the top position,
there are 3 flags remaining to choose to put just underneath
it.
That's 4×3 or 12 ways to place two flags in the top two
positions.
For each of those 4×3 or 12 ways to choose flags for
the top two positions, there are 2 flags remaining to choose
to put next to the bottom position.
That's 4×3×2 or 12×2 or 24 ways to choose flags
for the top 3 positions.
Now there is only one flag left and only one position at the
bottom to place it in, so we just multiply by 1, and we still
have
4×3×2×1 = 4! = 24 ways to arrange the flags in different orders.
This is also called "the number of permutations of 4 things
taken 4 at a time."
Edwin