Longest Common Prefix

One test case is not working, Please help.
Here is my code- https://ide.codingblocks.com/s/300664

@LPLC0059,
Complexity of your code is O(n^2). You should optimise it.

But the problem is not Time Limit Exceeded, in that test case. It’s showing Wrong answer.

@LPLC0059,
Corrected Code.