Driver Code
public static void main ( String args [ ] ) { int [ ] [ ] A = { { 1 , 1 , 0 } , { 0 , 0 , 1 } , { 0 , 1 , 0 } } ; int [ ] [ ] B = { { 0 , 0 , 1 } , { 0 , 1 , 0 } , { 1 , 1 , 0 } } ; int N = A . length ; int M = B [ 0 ] . length ; System . out . println ( minSwaps ( N , M , A , B ) ) ; } }