When I compare java solutions with other C++ solutions in "Accepted page" I sometimes see that java solutions are faster than C++ ones in terms of running time. For example for this question : https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/. Is that an actual running time or am I missing something? I am kind of confused, as I have always been thinking that java is way slower than C++ due to two-step compilation process. Or there is another possibility that I can think of(Java test cases are very, very smaller than others???)
More coder use Java. So Leetcode may run Java code on more powerful servers to support java users. C++ faster than Java in most time.
One employer in LeetCode said that because java compile time is unstable, they have to remove compile and other procedure runtime from the benchmark.
Which means for C/C++ solutions, compile time was counted in the runtime
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.