a permutation length n array pp_1p_2dot p_n contain integer 1 n inclusive exactly for example p4 2 6 5 3 1 permutation length 6you give integer n b n number print permutation length n minimum element leave half equal maximum element right half equal b print 1 permutation exist