Driver program to test above function
public static void main ( String [ ] args ) { int height [ ] = { 2 , 1 , 2 , 5 , 1 } ; int N = height . length ; System . out . println ( minSteps ( height , N ) ) ; } }