An array of integers p1,p2,…,pnp1,p2,…,pn is called a permutation if it contains each number from 11 to nn exactly once. For example, the following arrays are p...
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.