I was able to solve the first part but I would like to know, how do I solve the second part. Please could somebody help me out.
P.S: I read in another post that the answer to this question might have been discussed but I could find it nowhere. I apologize in advance if that is the case and would kindly request anyone to please provide me the link to where the solution of the second part has been mentioned.