Returns number of islands in a [ ] [ ]
int countIslands ( vector < vector < int > > a ) { int n = a . size ( ) ; int m = a [ 0 ] . size ( ) ; DisjointUnionSets * dus = new DisjointUnionSets ( n * m ) ;