UiPath Interview Question

(Round 2) N queen problem