Add solution to problem #36

Added solution to problem #36