Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Unpublishing as a duplicate of https://www.codewars.com/kata/top-n-closest-points with long-standing, unresolved issues.
Typo: "norm({3,4}) = sqrt(1^2+1^2) = 5" should be "norm({3,4}) = sqrt(3^2+4^2) = 5"
Fixed
There seems to be something wrong with the tests. I get the following error messages:
./tests.cpp:96:30: error: use of undeclared identifier 'converttovector'
vector actual = converttovector(findMostFrequent(l));
^
./tests.cpp:102:14: error: no type named 'random_device' in namespace 'std'
std::random_device rd; //Will be used to obtain a seed for the random number engine
~~~~~^
./tests.cpp:103:21: error: expected ';' after expression
std::mt19937 gen(rd()); //Standard mersenne_twister_engine seeded with rd()
^
;
./tests.cpp:103:14: error: no member named 'mt19937' in namespace 'std'
std::mt19937 gen(rd()); //Standard mersenne_twister_engine seeded with rd()
Fixed
C++ tests generate warnings.
Yes, without cout worked!!
Thanks!!
you're probably printing too much to the console
What to do when
Max Buffer Size Reached (1.5 MiB)?
By the same reasoning, all Python solutions should get a comment saying that 'Good solution but requires Python. Would be a problem if writing for embedded devices'. This shows that this comment about C++11 is completely irrelevant.
Not trying to say you're wrong, but I believe this is what siebenschlaefer is trying to say.
Great Kata, keep up the good work :D It took me a bit longer than expected to complete it but I learned how to use a few C++ built-ins that I previously haven't worked with in the process.
In C++ tests are in the same file with solutions,
static
wouldn't do anything.FYI, in C/C++, hiding the solution code can always be done by declaring the function
static
.Needs random tests.
There is no
empty_test
any more.Loading more items...