Function returns maximum number of required elements
static void maximumCount ( int [ ] A , int [ ] B , int n ) { Queue < int > q = new Queue < int > ( ) ; HashSet < int > s = new HashSet < int > ( ) ;