Note that there are some explanatory texts on larger screens.

plurals
  1. USspacecadet
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. COThat definitely helped a bit! There was an issue there, stemming from when max equaled min. Basically it triggered when the array was balanced, but seemingly had an odd number of elements. My fix was to keep a counter of the elements appended, and if it were less than the total at the end, append on the median X+1 median Y+1. This solved my test cases perfectly..though it has only done slightly better in the auto grader, going from a 10% to a 30%. Sigh @_@
      singulars
    2. COThank you for taking a look. It appears as though I was over thinking the initialization. I've edited my post to reflect the current issue. I'll of course spend some more time debugging when I can and update if I figure it out, but I'm still hoping someone might see what must be a big issue. It still fails to print the last number '5' on the 3 by 4 array, and when I submit to the codeeval auto grader, it gets a 10% :-(.
      singulars
    3. COThank you! It always comes back to Dijkstra :d "Dijkstra finds all pairs in a single pass as x sweeps downward from the integer square root of n and y sweeps upward from zero" This is exactly what I was hoping to implement, albeit, much more elegant than my notepad scratching. I just forgot the crucial step of starting from the square root (though I have it written in my pseudo code >.<). I think I missed one case, though. I'll give your blog a look tonight! Thanks.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload