Comparing explosive properties of mercury(II) cyanate and mercury(II) fulminate I found this question online on Jiskha Homework Help:

Of the compounds mercury(II) cyanate, $\ce{Hg(OCN)2},$ and mercury(II) fulminate, $\ce{Hg(CNO)2},$ one is highly explosive, the other is not. Explain.

My teachers says that most explosives are made of nitro compounds as abnormal expansion in $\ce{N-O}$ bond has been observed in nitro compounds above a certain temperature. So, fulminate will be more explosive as it contains $\ce{N-O}$ bond.
According to Wikipedia, explosiveness of nitro and other nitrogen containing compounds (like $\ce{NI3})$ is because of possibility of forming highly inert and stable $\ce{N2}$ molecules. Thus slight amount of energy causes breaking of relatively weaker $\ce{N-O}$ bonds and highly exothermic formation of $\ce{N2}$ triple bond making it act like an explosive.
Is my teacher correct? The reasoning given on Wikipedia also points to fulminate but some other concept may be at play here. So, which is correct? Also what would be the reaction mechanism if any?
This can be attributed to the formal charges of fulminate ion and cyanate ion. Structural stability of a compound sometimes depend on formal charge.


We observe that formal charges of fulminate ion is higher than cyanate ion for which fulminate ions are said to have a less favorable molecular configurations which leads to facile decomposition of the fulminate ion.
Fulminate vs cyanate stability has been demonstrated by using their corresponding silver compounds. Here is a video demonstration.