Solution for subs problem
Solution for hamming problem
Add comments and clean up the formatting