Increment the frequency of A [ j + 1 ] as it can be a valid A [ k ]
if ( map . containsKey ( A [ j + 1 ] ) ) map . put ( A [ j + 1 ] , map . get ( A [ j + 1 ] ) + 1 ) ; else map . put ( A [ j + 1 ] , 1 ) ; for ( int i = 0 ; i < j ; i ++ ) { int target = A [ i ] * A [ j ] ;