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 simplified your
replaceFirstXfunction it was overly complicated—and made a minor adjustment to thereplaceThirdsfunction.Initializing a variable with the value -100 isn't the best idea. It would be much better to assign the value nums[0] to the first variable and nums[1] to the second, and skip the first value in the nums list using skip(), since you're using forEach.
Why are you sorting the input list? It's already sorted.
Why are you converting the list into a string?
You can perform exactly the same operations with a list, thereby eliminating string concatenation and speeding up the code.
Your code looks pretty weird. What kind of LLM are you from?
why did you use empty(growable: true) when you could have just [];
No random tests.
Yes, I didn't think I had to specify this katian. A string is an array of chars in C. I am referring to an array of single digit numbers.
I have no idea what happened there. Not replicating, and I wasn't working on the code within hours of when your comment is timestamped.
Changed it back for consistency when translating. Return expects a string also.
fyi, string in C is an array
Right, so, like I said above, an array would be better.
a 75-digits unsigned long long?
I would think a list would be most appropriate for python. I don't know why it has to be a string in C, if you wanted to use a numeric type, you could use an unsigned long long. Still, I would think that an array would be best for C.
As Johan says: This is just my opinion, other opinions are available.
I don't see why you'd prefer
int. It has to be string in languages like C.your input types are different across tests?
change the title as well?
Loading more items...