Help me to solve this problem

this is looking like impossible

@anujsharmabadboy
we have to print total n lines in this pattern. In each line we have to print some spaces, some numbers, some spaces and again some numbers. The maximum number that will be printed is n/2 - 1 (4 in this case) and the minimum number will be 1.
There are 12 spaces in the first line. And in the middle line, there are 0 spaces. In the last line again, there are 12 spaces in the starting. Can you find a relation between n, i or number of spaces in the starting? Similarly you can find a relation between the numbers being printed in each line with i. You can also observe that this pattern has a lot of symmetry so you can use that.

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.