Add solution to problem #35

Added solution to problem #35