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