Explain the reason for the following:
A primary alkylhalide, RX, reacts with KCN to give an alkyl cyanide and with AgCN to give an alkyl isocyanide as the major, product.
KCN is ionic in nature so it dissociates completely into K+ and CN- also, C-C bond is more stronger then C-N bond because of this when haloalkanes react with KCN to form alkyl cyanides.
AgCN is convalent in nature thus, it does not dissociate in to Ag+ and CN- and on nitrogen electron density is high thus haloalkane react with AgCN and isocyanide is form.