Solved group 2 and 3

Started looking at the problems in a simpler way. Shorter and cleaner
code. Please advise me if this isn’t the direction you would like me to
go