Ruby 3.0 should be enabled, see this to learn how to do it
No. Check the examples in the kata's description.
Supermarket till (google images)
This comment is hidden because it contains spoiler information about the solution
How can I delete my comment? :D
I think that the difficulty of this kata must be 5kyu or less
I dont really understand what this is asking for. do you want me to multiply the time of each customer by the amount of tills or what?
GCC does not conform to any ANSI/ISO standards, if that isn't a problem for you, your employer, etc game on. C++ is an object oriented language derived from C. C is not an object oriented language. Being object oriented, C++ has many more tools in its libraries for declaration of objects including dynamically allocated arrays. My comment was not in response to a solution in C++. You can learn the way that works some of the time or the way that works all of the time.
Why such reaction tho? GCC supports VLAs since, like, forever, even in C++. For non-MSVC part of the world they are probably not that surprising?
"int tills[n]" declares a variable-length array (VLA) which was not implemented until the C99 standard and was relegated in C11. MSVC, for example, does not support VLA. Depending on what compiler you are using and the standards it conforms to (or avoids) attempting to decalare a VLA in C may throw an error. As I understand it, the reason this support was removed is due to the vulnerability it introduces to stack based buffer overflow exploits. Using malloc or calloc from stdlib will ensure you don't run into errors while compiling in other environments.
My comment was not meant to mock anyone, it was more of a reaction to the fact that the compiler here actually lets you get away with it.
He only trained on C and C++, that's probably not his problem. okhramkov, please read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution
Codewars runs an older version of node that doesn't support some modern JS methods. Could be why.
Are you running it in node via VScode or in browser?
If you mock beginners for bad practice, it'd be nice to explain what's wrong about it.