Ad
  • Custom User Avatar
  • Custom User Avatar

    I've been doing garbage collected languages too much. I'd probably make it static rather than just adding a free for performance.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I had the same problem in Chrome on Mac, but only if dev tools was open. Closing dev tools rendered everything properly.

  • Custom User Avatar

    Further experiments show that when it happens, it always happens on the array of length 12345 and crashes on the first array reference.

    I revise my hypothesis. I think that there is an unchecked memory allocation failure in the test driver and that sometimes the memory allocation for the test array fails.

  • Custom User Avatar

    I was getting sporadic failures in C with the resulting message "Test crashed" which I suppose you'd classify as a server failure. I've only encountered that in situations that seg fault. The only place in the code that I can see an unchecked reference against bounds is an assumption that there will be at least two elements in the array, so I don't do any bounds check for an array[1] reference.

  • Custom User Avatar

    I think the random tests are creating single element arrays, which should not be possible if there is always a definitive answer as it wouldn't allow you to determine ascending/descending. I kept getting sporadic crashes in my runs preceding final submission and can't come up with any other way it could happen besides my referencing the second element of the array without checking bounds.

  • Custom User Avatar

    Does this work for "1110000000111" a.k.a. "- -" a.k.a. "T T"?