Write the mechanism of the following reaction:
The given reaction is:
The given reaction is an SN2 reaction. In this reaction, CN− acts as the nucleophile and attacks the carbon atom to which Br is attached. CN− ion is an ambident nucleophile and can attack through both C and N. In this case, it attacks through the C-atom.