Added class for solving Triangle problem