|
|
back to boardCan you help? Had anyone got WA#8? Posted by maksay 5 Dec 2007 00:43 I've got WA8 using NlogN algo with 3\4 and 1\4 of numbers/ If somebody had same problems please help or give some tests Re: Can you help? Had anyone got WA#8? Posted by vesib 17 Mar 2008 14:09 i had :) I used heap my mistake was when n is even, I didn't check which of the two successors of the biggest element is bigger for example n=10 1 2 3 4 5 6 7 8 9 10 my output was 5.0 because i took 6 (the biggest element left) but i took also 4 instead of 5 (the heap was 6 4 5 ... and there was no check whether 4>5) Edited by author 17.03.2008 14:09 |
|
|