The first part of the solution was written twice, from "load" to "D=dist(sel, sel)" [HW2.pdf](https://github.com/user-attachments/files/24037022/HW2.pdf)