I'm researching about the Mpemba effect and I came across an explanation saying that the effect occurs because at higher temperatures, the hydrogen bonds between the water molecules stretch and store energy and when the water starts to cool, the hydrogen bonds go back to normal and release the stored energy on top of the normal cooling process, that's why hot water freezes faster than cold water.
I'm quite new to hydrogen bonds, so I don't really understand how hydrogen bonds can store energy. I thought bonding was something like a magnet attracting something, the further you get, the weaker the attractive force becomes. Or am I understanding it wrong?
The article that I saw this in is Hot water freezes faster than cold water; physicists solve the Mpemba effect