Maximum sum of difference of adjacent elements
Given a number n. We have to find maximum sum of all permutations of n. The maximum sum will be sum of absolute difference of adjacent elements in array. Examples: Input : 3 Output : 3 Permutations of size 3 are: {1, 2, 3} = 1 + 1 {1, 3, 2} = 2 + 1 {2, 1, 3} = 1 + 2 {2, 3, 1} = 1 + 2 {3, 1, 2} = 2 +