This is a medium level coding problem available in problem solving section of hacekrrank . Main aspect of this question is time limit, a not so strong logic cannot pass this question.
Try it yourself and then come watch my solution for diverse approach.
Link for the question:
www.hackerrank.com/challenges...
Please tell me in the comment section if you want me to solve any the the coding problems. Also share the link to the problem.
7 янв 2021