What is the time complexity and space complexity of BFS and DFS? Which one is better?


  • 0
    B

    The time complexity using BFS and DFS should both be O(m^n*n), and O(m^n). Where m is 4 and n is the length of digits


Log in to reply
 

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