|
|
вернуться в форумAnyone have any ideas on what Test 8 is doing? Had some issues implementing the heap, and then realised had a nice Access Violation (didn't bother to check we weren't exceeding the bounds on the heaps underlying array). Now I'm stuck on Test #8 - but I've tried every test I've seen suggested in the comments....Anyone got a nice test to try ??? Re: Anyone have any ideas on what Test 8 is doing? I've even tried generating up to about 190000 random numbers < 2^31-1 in Excel (3 columns) and my median always agrees with theirs.... I've Also tried the same number of ordered numbers (incrementing by 1) as well as random but sorted numbers in a single column (sorted in both directions). I suspect I have some silly output issue (rather than a logic issue - but that might just be because I;m arrogant). I think the admins might want to check the wording Ok, for those who have trouble with test 8. Apparently 0 is a valid value in the tests (I'd assumed that POSITIVE meant "strictly greater than 0" - I would have thought including 0 is NON-NEGATIVE rather than POSITIVE). Once I catered for the possibility of 0 in the heap, everything was happy.... In my case In my case I was getting wrong one of the elements for the semi-sum. |
|
|