python error


  • 0
    L

    report Memory Limit Exceeded .......
    But I just use constant memory(actually two points)
    How could this be possible to reach the memory liminit??


  • 0
    M

    Add below lines to your code at the start of your code.
    import gc
    gc.collect()

    This will resolve your issues.


Log in to reply
 

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