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