Getting TLE in Test case 2

https://ide.codingblocks.com/s/408834. Getting TLE in test case 2. Is it because of the ‘isitSafe’ funtion?

your code is giving wrong answer for n=11 , your code output is tle correct output is 2680
use optimzesolution
if Queen is placed in particular row then change row value

https://ide.codingblocks.com/s/409828. Made the modification. Still facing time issue.