Driver code
public static void main ( String args [ ] ) { int arr [ ] = { 1 , 0 , 0 , 1 , 0 , 1 } ; int n = arr . length ; int a = 1 ; int b = 2 ; System . out . println ( findElementsCrossed ( arr , a , b , n ) ) ; } }