To synthesize the following via a single-step SN2 reaction starting from an alkyl halide,
allyl chloride is treaded with KCN in a polar aprotic solvent
For good SN2, a salt like KCN is used with the following substrate in apolar aprotic solvent like DMSO: