The bug said that the test cases are not proper and hence not giving correct output. I checked the code thoroughly for mistakes and even checked the test cases. All is fine. I added a test case too for better understanding.
Checklist
[ x ] I've read the contribution guidelines.
[ x ] I've checked the issue list before deciding what to submit.
[ x ] I've edited the README.md and link to my code.
Have you read the Contributing Guidelines on Pull Requests?
Yes.
Description
The bug said that the test cases are not proper and hence not giving correct output. I checked the code thoroughly for mistakes and even checked the test cases. All is fine. I added a test case too for better understanding.
Checklist
README.md
and link to my code.Related Issues or Pull Requests
For issue #7529