Updated changes in code - brute force and algorithms

Completed changes for all the observations that you done, please let me know if I'm still missing something