How to transfer algorithmic reasoning knowledge to learn new algorithms?