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