Why java runs faster than C++ in this problem


  • 0
    Y

    I used binary indexed tree and checked my code with some java solutions. I don't think there's any major difference between my solution and others. Thanks.


  • 1
    L

    What I could think of is they need to create a virtual machine for c++, and detect memory usage and stuff, which makes it slower than the JVM.


Log in to reply
 

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