Oops!! 😑 There was a runtime error in a test case !!
So the Perfect solution is linked in the resources section so please check it out!!
Sorry for the inconvenience !! I really tried my best to serve you good content!!
Thanks,
Neeraj Ap