Driver Code
public static void main ( String [ ] args ) { int [ ] arr = { 3 , 12 , 9 , 5 , 3 , 4 , 6 , 5 , 10 } ; int K = 14 ; int N = arr . length ; System . out . print ( largestNumber ( arr , N , K ) ) ; } }