@awice Thank you. For what value of n, I should worry about out of memory for the BFS solution?
@palindrome88 BFS is a fine approach, but you may get more mileage by traversing your search-space in a prioritized manner (ex: prioritizing board configurations that are "closer" to the solution). You can also use other optimizations like caching some expensive computations and recording a previous board-state.
Were you asked this in an on-site or was it a phone screen?
@palindrome88 , i can't understand the question , can you elaborate that please.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.