TikTok Interview Question

N-queens given a n by n grid and decode a string