Added solution for problem tree