How can somebody get 30ms with Python? takes 35 ms even I return answer directly!


  • 1
    R

    For the test case:
    The runtime is 35 ms even I return [5, 6] directly without any loops.

    I don't think it will have a faster way other than return answer directly.

    Just cannot believe...


  • 0
    S

    Maybe it's depens on computer


  • 0
    D

    @SmallerWhale why ? How would it be possible to run some python code client-side in a browser ?
    And how would they handle C++ and other compiled langages ?

    It's simple, I think they lie and that the code is executed server-side.


Log in to reply
 

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