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.
This comment has been deleted.
I'm a native speaker and I don't understand wtf it's asking. Tf is Max? It seems to only take in one parameter. When my Java doc shows it needs a minimum of two values.
No company would ever accept your answer out of style. Your code needs to perform.
CS isn't for you bro
Addition runs faster than multiplication
This comment is hidden because it contains spoiler information about the solution
.replace is better. But you also messed up by using a built in method. Build your own algorithm. I know you couldn't solve a leetcode problem, but this isn't the smart way either.
You can remove the character array object declaration and pass the character array object directly to the for loop. You can also delete the string object and return a string object by just calling the variables and concatenating with the '/' symbol in the middle and the string length at the end.
Characters are compared against their decimal values in the ascii table. All you have to do is make sure the current character is not less than or greater than the decimal value of 'a' and 'm'.
For example, the statement:
'a' > 'b' is false.
'b' > 'a' is true.
If the current character is greater than 'm' or less than 'a' add 1 to the error count. Just return that string and call it done. All these people using preexisting subroutines are the reason why they can't finish a leetcode problem.
This isn't an algorithm. This is just using an existing method to solve your problem. Use your brain instead of using an existing subroutine.
Wtf is this?
It is not best practice. The same people that go on leetcode that demands more of them and then downvote the problem come here to do their shenanigans and upvote the clever answers and call them a best practice. Bunch of 12 year olds.
This comment is hidden because it contains spoiler information about the solution