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.
Indeed, the names should be
maximum'
andminimum'
.EDIT
I also thought it's a kata bug at first, but there's actually a workaround for name ambiguousness built into the language. You can refer to the Haskell wiki.
What I would add, however, is that this kata is most likely 7, not 8. Also, using the named workaround is definitely not a good practice in real world, which my first version of the comment points out.
You mixed like 4 languages: Java, English, Ukrainian and Russian. Definitely the smartest solution!
This comment is hidden because it contains spoiler information about the solution
The point is to find the easiest solution and I think this one is the best here.
Hi. The original Java code template seems to be in C-style, while common Java convention is to have first curly bracket at the end of the first line of a method declaration.
https://www.cs.cornell.edu/courses/JavaAndDS/JavaStyle.html#Indentation
a compiler behaving weirdly... evidence?
Number of tests are scaled as per the total time (runtime + compilation time) of languages hence the required time complexity is roughly same across all languages.
and I've done this in python.
The author should have knowon that Python is slow and not capable of doing all of this under 12000 ms
instead of putting unnecessary tests that are impossible to do under 12000 ms
My code is just 2 lines (could have been 1 but this is for better excution time) and it still gives
me an
Execution Timed Out (12000 ms)
Error.I'm not using for loop, or while loop, or anything that could be
possibly slowing down the program, I am just using math library (which is pure C) with len, strip functions
(which are pure C too)
That's not a programming task, but a maths task. Downvoted.
P.S. It was useful for me tho since I missed the hint at first therefore learned new things about the language. Thanks my unattentiveness for that. :)
I also resolved this kata. But your compiler behaved wierdly in some cases.
If you can provide evidence that the C code is broken, then give examples of input / output, and expected values. Otherwise, take notice that hundreds of coders have succesfully solved the kata in C so far. Given that you had a
SIGSEGV
, it likely that you had not dynamically allocated memory for the return.C test is broken.
Test Crashed
Caught unexpected signal: SIGSEGV (11). Invalid memory access.
But the same code works on my computer (compiled with gcc).
The best kata, where you need to actually code, not do maths.
I have the same. No ideas, what's wrong, the description gives no clues.