ABCDE
Bounds of 1 and 4 would be referring to
B to E
So, your output "AEDCB" is actually correct.
Note, A = 0, B = 1, C = 2, D = 3, E = 4.