Hi, I wrote the code for the inverted hourglass and was able to achieve the output as well, Bu how can I figure out what is wrong in it, if I am not able to see the test cases and if i see them, then my score still turns 0. Can i be explained what is the problem in my code here.
Solution submitted and tested for various inputs but still test cases failed
I gave the code in java
@muskanvashisht7_0542d4b92e256d86 The output you’re getting with this code is not correct :
correct output :
5 5
5 4 4 5
5 4 3 3 4 5
5 4 3 2 2 3 4 5
5 4 3 2 1 1 2 3 4 5
5 4 3 2 1 0 1 2 3 4 5
5 4 3 2 1 1 2 3 4 5
5 4 3 2 2 3 4 5
5 4 3 3 4 5
5 4 4 5
5 5
Your Output : (See double zeroes in the middle row) : Debug your code for this
5 5
5 4 4 5
5 4 3 3 4 5
5 4 3 2 2 3 4 5
5 4 3 2 1 1 2 3 4 5
5 4 3 2 1 0 0 1 2 3 4
5 4 3 2 1 1 2 3 4 5
5 4 3 2 2 3 4 5
5 4 3 3 4 5
5 4 4 5
5 5
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.