Driver code
public static void main ( String [ ] args ) { Integer [ ] arr = { 1 , 2 , 1 , 4 , 3 } ; Vector < Integer > ar = new Vector < > ( Arrays . asList ( arr ) ) ; System . out . println ( getMinimumOps ( ar ) ) ; } }