Test cases are failing

Code is correct but test cases are failing

@Jan19LP0018 your for loop condition to give spacs before everyline should be :
j < i-1 not j <= i -1; //since this will one extra spaces before printing which is causing your answer to be wrong since spaces before pattern is judged by the judge. So change this condition for both upper half and lower half.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.