Driver code
public static void Main ( String [ ] args ) { int [ ] A = { 2 , 3 , 1 , 4 , 5 } ; int [ ] B = { 2 , 2 , 1 , 4 , 2 } ; int size = A . Length ; Console . WriteLine ( solve ( A , B , size ) ) ; } }