one of my test is case is showing wrong answer and I am not able to relate to it please help
Test case not understandable
Hello @jatingarg17,
How to share your code:
- Paste your code on Online Coding Blocks IDE:https://ide.codingblocks.com/
- Save it there.
- Share the URL generated.
Now, coming back to your code:
Your mycompare function is logically incorrect.
You are just checking for the first charcters of both the strings.
Example:
4
bat
bann
apple
batman
Expected Output:
apple
bann
batman
bat
You can refer to the following code:
Hope, this would help.
Give a like if you are satisfying.