Distilling Algorithmic Reasoning from LLMs via Explaining Solution Programs