This is O(mn)-space in fact


  • 0
    T

    If state is 0 or 1, then state can be stored as vector<vector<bool>> board, int is not necessary.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.