What is my C code not printing # in staircase pattern, this is from hackerrank, I did not pass all test cases, but i can't point out why?
The problem is in the condition if((i + j) > ((n / 2) + 1)) It should be if(j >= n – i – 1) // or if(i + j >= n – 1) To make this easier, I would create a helper function. Also, there’s no need for the VLA a[n][n] that you don’t … Read more