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.
your solution is more efficient. Dont think less code is better code. Faster code is better code.
This is actually not a very good solution(
For the problem of finding the minimum element in this solution, you additionally need to sort the array
In case the length of the array -> to infinity, sorting it will take several orders of magnitude longer than just finding the minimum
That's really smart. I wish I'd thought of that, lol. I'm still learning Java though, so not getting too made at myself, XD.
Straightforward solution. But it doesn't checks the value range?..
The method is receiving a reference to the array object, not a copy of the array. Any modifications made to the array will affect other parts of the code that have access to the original array. If you need to preserve the original array value, you can create a copy of the array within the method to prevent it from being modified.
BigO notation. Look it Up
Wouldn't that not be the case because the args array is only rearranged within the scope of this function?
No,
If you multiply 0 to any number it will become 0, so no error
Cool solution :D
if the valor of variables is 0 would throw error.
Im new with the programming, just want to now if i understand this correctly, getNumericValue is checking for the first char from the string and return string depending on the number?
This comment is hidden because it contains spoiler information about the solution
This solution uses prefix recursion. Use tail recursion to collapse the stack depth.
I was trying to do this but never figured it out till now.
若测试用例有2位数字的话,这个答案就不适用了
Loading more items...