Why copy.deepcopy takes more time than establishing a new node?


  • 0
    T

    Why copy.deepcopy takes more time than establishing a new node like RandomListNode(head.label)? Since I met TLE using deepcopy, while got AC by establishing new nodes. My language is python.


Log in to reply
 

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