Minimum Distance Practice Coding Problem