4 ms·
Really it was just write code to verify whether it can be done or not (return boolean) based on the N input (integer). Without having to write code it would re
by somethingnew 13y ago
Really it was just write code to verify whether it can be done or not (return boolean) based on the N input (integer). Without having to write code it would return true for N >= 4, but I didn't know that. I was just trying to get an initial solution down with recursion, not thinking about backtracking yet or worst case time (which was probably 2^N).