Set current queen as the attacker
attackers [ 5 ] = queens [ i ] ; } } for ( int i = 0 ; i < 8 ; i ++ ) if ( attackers [ i ] [ 0 ] != - 1 ) sol . add ( Arrays . stream ( attackers [ i ] ) . boxed ( ) . collect ( Collectors . toList ( ) ) ) ;