Driver code
public static void main ( String args [ ] ) { int [ ] codeTime = { 1 , 2 , 3 , 1 , 1 , 3 } ; int n = codeTime . length ; int WorkingSessionTime = 4 ; System . out . println ( solve ( codeTime , n , WorkingSessionTime ) ) ; } }