the answer to this is 4! or 24 different ways.

This can be represented by blocks represented by a,b,c,d

A B C D, A B D C, A C B D, A C D B, A D B C, A D C B, B A C D, B A D C, B C A D, B C D A, B D A C, B D C A, C A B D, C A D B, C B A D, C B D A, C D A B, C D B A, D A B C, D A C B, D B A C, D B C A, D C A B, D C B A.... 24 COMBINATIONS

Have a look at factorials on the net and this will hopefully give you some ideas on how to attack problems of this nature, without having to produce a big sample space to work out the answer.