Print all the coordinates of the queens attacking the king
private static void print ( List < List < Integer > > ans ) { for ( int i = 0 ; i < ans . size ( ) ; i ++ ) { for ( int j = 0 ; j < 2 ; j ++ ) System . out . print ( ans . get ( i ) . get ( j ) + " ▁ " ) ; System . out . println ( ) ; } }