Greetings!
We have recently witnessed a huge surge and request of people asking for edge cases, or cases where their code is failing. Hence, this thread is a list of all the tricky cases i have seen so far. In case you have any other case to add, answer below. For any correction, please COMMENT on that answer (whose test cause you think has some error).
Also, in case you pass all the given cases here, tell us that you need more help. (And dont forget to add the case here as an answer when you find the edge case!)
(PS: There might be a possibility of error in value of n and actual string length, due to human inaccuracy. Users are requested to overwrite the value of n i input with the length of either of two strings.)
1.Boat(1) + Small Boat(1)+ Mirage(2)
4
7
*.....*
.*****.
7
.*****.
*.....*
11
...*...*...
....***....
11
....***....
...*...*...
Expected Output-
5
5
3
3
2.Lets Zig-Zag! (4)
4
7
..*..**
*..**..
6
*.*.*.
...*..
8
*.*...*.
.*..*..*
7
...*.*.
.**..**
Expected Output
4
3
3
4
3.Mind the V!(2)
2
6
..*.*.
.*...*
6
.*...*
..*.*.
Expected Output
2
2
Well, these were the test cases i had to care for in my code when i debugged. In case your doubt still persists, COMMENT the link of your code on the Q and I ,or other users, will look for more (and add the test cases here).
(In case you are unable to comment, its fine, i will convert it into a comment. I want that answers should be there only for test cases.)
EDIT-
Another Tricky one (for some approaches)
1
10
***.**..*.
.*...****.
Expected Output
8
Another one-
Input
1
5
.*..*
...*.
Your Output
0
Expected Output
2