Provided solution for sub-problem 1

Provided solution for sub-problem 1