Folding numbers coding test - given a set of numbers, how will they be arranged on a stack if the set of numbers is folded in half to the left or the right.
Example: 1 2 3 4
Folded from the left, the arrangement will now be
2 1 (top)
3 4 (bottom)
Folded from the right, the arrangement would have been
4 3 (top)
1 2 (bottom)
If the task was 1) fold left, and then 2) fold left again, the steps would be:
Starting point: 1 2 3 4
Step 1:
2 1
3 4
Step 2:
3
2
1
4