Six boxes- Box A, Box B, Box C, Box D, Box E and Box F are kept one above the other in a stack, but not necessarily in the same order.
The bottommost stack is numbered as 1, while the topmost stack is numbered as 6.
Either box A is kept at the topmost or Box E is kept at the bottommost position.
Box A is kept immediate above box E.
Two boxes are kept between Box D and Box E.
| Case 1 | Case 2 |
Stack | Boxes | Boxes |
6 | A | |
5 | E | |
4 | | D |
3 | | |
2 | D | A |
1 | | E |
Box F is neither kept adjacent to Box D nor Box E. Thus, case 1 is invalid.
| Case 2 |
Stack | Boxes |
6 | F |
5 | |
4 | D |
3 | |
2 | A |
1 | E |
Box B is kept below Box C.
Therefore, the final arrangement is:
Four boxes are kept between Box E and Box F.