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.
BigInt cannot be a common approach if a language does not support it.
Once again, this kata was meant for languages which do not support big integer arithmetic, either natively, or by easily accessible libraries. JS translation was created when bigint was not in the language, and now it's considered undesired and it's planned for removal. Languages like C, C++, COBOL, are valid languages for this task. Languages like Java or C# are arguably misused: BigInteger classes can be restricted, but still the question would be whether this is reasonable, and can be done reliably enough. If the answer would be "no", the translations should be disabled too.
Currently, Codewars does not support any form of disabling translations, so we have to live with whatever got carelessly approved or did not age well. But such functionality is planned, and JS translation will be probably first to be removed from bigint kata, with possibly other languages which natively support bigint to follow.
It's also worth noting that BigInt would and should be the common approach to a problem like this, and that this kata still teaches newer programmers like myself this staple data type. A solution that doesn't use big int might be better suited to a task that isn't addition for the sake of exploring large integer handling without worrying about addition on top of it.
This comment is hidden because it contains spoiler information about the solution
That's understandable. However, BigInt has been widely supported for quite a while now, so the instructions for the Kata should probably be updated to explicitly state that BigInt is to be avoided in any solutions attempted.
Yes, the reason is when the kata was published, BigInt was not available in NodeJS. Feel free to propose a better description (click
fork
at top page if you solved the kata, then submit your changes for approval on Discourse page).That should be explicitly stated.
for cpp at least is for sure 4kyu
Kyus of approved katas cannot be changed, it's useless to complain about that.
The point of this kata is not to use BigInt.
There's no issue, the instructions are worded oddly. Make sure you're representing the population with the correct data type
Read this: https://docs.codewars.com/training/troubleshooting/
because I'm not very good at JS XD. If you are interested, I've changed this.
And what's the suggestion? The instructions are clear.