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.
And here I am implementing PriorityQueue with HashMap XD
Short but very bad for performance.
Can someone explain the math happening in the if statement?
Why are we multiplying (g*3600) and dividing it by the difference of two speeds?
What does this represent?
This is a way to arounding up to nearest integer. For example 3/2 mast be 2, not 1.
You are not decreasing r by 5 but 4 that's the part I am having diffuculty to understand.
I also got confused, but worked it out analyticaly. It seems like this is rounded equation for t(hmax)
Smart but i dont understand why it work :o
Can someone explain it?
I think I spotted a mistake here.
The kata involves the operator () too, which is not included in the code.
The description says "Create a simple calculator that given a string of operators (), +, -, *, / and numbers separated by spaces returns the value of that expression".
So if I try
expression = "2 / ( 3 + 1 )"
It shows error since () isn't included.
Exception in thread "main" java.lang.NumberFormatException: For input string: "("
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:549)
at java.base/java.lang.Double.valueOf(Double.java:512)
at Test.main(Test.java:19)
Please check that up in the test cases.
Otherwise this is really a short and simple answer I would say.
Nice
Thank you very much for the explanation :)
This comment is hidden because it contains spoiler information about the solution
Can someone please explain in detail with an example, I couldn't understand the solution showed in the comments.
Can someone please explain the logic behind this solution?
This comment is hidden because it contains spoiler information about the solution
same here!
Loading more items...