Import disabled?


  • 0
    H

    Hi,

    I am wondering if the python ver of OJ does not allow any import? I tried to import collections several times in different problems as they are quite useful, but every time it says "Compile error". My code is right as it is accepted when I use another replacement of data structures.


  • 0

    You should not need to import collections library yourself.

    For example, you can use deque from the collections library:

    collections.deque('abc')

  • 0
    H

    got it. thanks!


Log in to reply
 

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