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.
I'm having some issues with JavaScript random tests that appear to have BigInt inputs and expect BigInt results because returning a Number yields:
lastDigit(5143600, 0: expected 1 to equal {}
If I convert the results to BigInt when the inputs are BigInt, this error is thrown:
TypeError: Do not know how to serialize a BigInt at JSON.stringify
Seems to be related to this issue with JSON.stringify and BigInt https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/BigInt_not_serializable, so maybe a test issue rather than a problem with my solution?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
NASM kyu text says "Define a function that takes in two non-negative integers a and b". The NASM base tests do not use integers. You get a pointer to a char. The kyu text is misleading and should be adjusted.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Lua
my answer lies in the lastdigits[i]
this passes the time limit:
this does not:
It doesnt seem to be an optimization problem, because the code doesnt pass the time limit only when i return the table element, but I can call it anywhere else in the code for however many times and there will be no problem
The kata's performance requirements are drastically different. For example, an O(N) solution in JS would pass easily but would time out in Python.
In JS, the maximum input caps of at 15 while for Python it can go up to 10e16 (or something along those lines). This is more than enough to warrant a big difference in performance expectations.
Missing image in the description:
C and NASM should be included in the final remarks about being passed in a string and not an integer.
Ruby 3.0 should be enabled.
CS translation submitted, kindly review & approve it.