(a) The right end is displaced towards right and the left end towards left(d) The right end is displaced towards left and the left end towards right.When the right end is displaced towards the right and the left end towards the left, then this is the case of tension (expansion) and the spring will have maximum displacement.When the right end is displaced towards the left and the left end towards the right, then this is the case of compression and ,again, the spring will have maximum displacement.