adding problem 43
adding approach 2