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.
clover solution, i don't remember we can access to a char by charAt(), i always used it but i don't know how i forgot that. thanks for a new short way to solution.
Nice ,short, and clean code congratulation !!
long one-liner which is not that easy to read. this good too
looks good
I wrote my code like this one and it didn't work..
Then I clicked see answers, I saw this one, went back to the Test, submitted again without changing anything and it worked.
Honestly, wtf.
nice work! But the question wanted to return NEW array
Yes, that way the original array that was passed in as a parameter is not modified.
This comment is hidden because it contains spoiler information about the solution
what is the equation doing in the Math.min brackets? I don't understand how the 0.05 and 0.25 work.
O(n)
Can be done with BigDecimal rather than with String parsing
this is a very cool solution and still very readable in my opinion, didn't think of using it
Nice Code !
Explain why I have an error
Exception in thread "main" java.lang.NumberFormatException: For input string: "8,6667"
at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.base/java.lang.Double.parseDouble(Double.java:735)
at Main2.barTriang(Main2.java:14)
at Main2.main(Main2.java:21)
Potential Unicode issue: if the string contains Unicode surrogate pairs (i.e. supplementary characters, like emoji and rare characters), this approach reverses those and produces a string with invalid/unintended characters. Solutions with StringBuilder#reverse() preserve the surrogate pair ordering, which is likely what you want in code.
Loading more items...