Function for finding minimum deletions so that the array becomes non - decreasing and the difference between adjacent elements is also non - decreasing
static int minimumDeletions ( int [ ] A , int N ) {