Just wondering if this problem can be solved using iterative approach (for-loops).
It can be solved using back-tracking. But what about using for-loops?
I have tried, but I got stuck. It looks like I have write k-for loops.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.