Can you please help me solve this code

It says to try more efficiently rather than brute force technique.

hello @tarunasree123
we can not perform better than o(n^2).

hint->
Divide the given pattern in two parts from middle .Now do the work of these parts separately and print the required pattern accordingly.

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.