Lonely Pixel I
how to solve this problem with DFS?
@chokobo Yes, my first attempt is directly use an colArray to record if B occurs in previous row, but I found it doesn't work. Then try to use total amount it occurs, then works.
Very concise and still O(mn) like the other solutions.
No one has replied
@yubad2000 Hey, Nice catch, updated the code with the fix.
Disabled Categories are greyed out
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.