Doubt ,Unable to think about the question


KIndly help me with the problem ,Just tell me How to approach it and i would code it myself