Minimum Collision Residue - Coding problem | OneNoughtOne