N Queen Hard Problem

It is giving TLE for test case 1. How can I make the code more efficient? https://ide.codingblocks.com/s/228345

@duttrohan0302
refer to this video