Can I get the full solution to the question? Or test cases to verify my answer?
@adarsh_2001 refer here dont forget to hit like and mark resolved if cleared