How can I do arrangements. of numbers... such that each new number formed out of arrangement has at max a difference of 1 from prev maxima.
e.g. if input is k=1 output will be 1 if k =2 outputs are : 11, 12 2,1 is wrong as left most has to be 1 always. if k = 3 outputs are: 111,112, 121, 122, 123 if k = 4 : 1111,1112,1121,1122,1123,1212,1211,1213,1223,1221, 1222, 1233, 1234 1423 is wrong diff b/w 1 and 4 is 3. 1243 is wrong diff b/w 2 and 4 is 2.... How I do this using DP? if possible ? -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.
