Recently I've found that subimissions with same code won't get same result. In fact, it varies a lot. First it beats 2.3 percents, then it could beats 92 percents. I don't think it's a good thing. I can't figure out my code is whether good or not. Anybody know why?
So when your code is run the second time, you expect the server to be in the exact same state as the first time?
Which problem was it, which language did you use, and what were the two times?
@StefanPochmann power of four, C++, 4ms and 8ms, I may get wrong beats percents, is it normal?
@wr_bupt That seems odd. Are you sure it's that problem, C++, and 2.3% and 92%? I looked at some of my submissions with 8ms and 4ms, and I'm told I beat 13.80% and 83.51%. And I think you should get the same percentages.
@LHearen Please define "too much", as it is subjective. What was mentioned by @wr_bupt 4ms and 8ms is insignificant. However, the runtime distribution graph should not reflect a jump from 2% to 90+% within this small change. We'll refine on a displaying a better graph in the future.
@1337c0d3r Once, of course not often, I met quite the same case
jumping too much from <10% to >80%.
@LHearen What you mean <10% to >80%? Please give concrete runtime numbers. As mentioned by @wr_bupt it is possible to jump from <10% percentile to >80% percentile, due to majority of submissions are within the 4ms-8ms range.
@StefanPochmann Sorry, I remembered the wrong percent. But it do vary a lot, and what makes me surprised is that the run time just distribute at 4ms and 8 ms. Run time between 4ms and 8ms is just about 1 percent, that is far from evenly distributed. It appears like two different code with different efficiency rather than the state of machine, which I think is a random factor.
@1337c0d3r Submitting LRU problem twice with the same code also reveals widely varying results - once 159 ms and once 92 ms.
For solutions in which majority of the submission using a single known algorithm this can become evident as everyone is around that range from 8-11ms (27% variation) so by any circumstances you could get best or worst result. I am more concerned about sometimes my submission got 1ms and just a few second afterwards 6ms, so 600% variation...
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.