Its not bad.
Just remember to make your code easy to understand to others.
Also try not to repeat yourself. You are calculating 3 times the where the half is.
Instead you can make a specific variable for it at the beginning solving both of your problems.
how do you test for time?
great solution bro
what happens if you have 10 of e and 1 s? They would cancle each other out... Better 2 variables.
your solution is more efficient. Dont think less code is better code. Faster code is better code.
more efficient and has better methods when working with integers
"...removes all exclamation marks..."
"? true : false" is unnecessary
best one
Its not bad.
Just remember to make your code easy to understand to others.
Also try not to repeat yourself. You are calculating 3 times the where the half is.
Instead you can make a specific variable for it at the beginning solving both of your problems.
This comment is hidden because it contains spoiler information about the solution
yes, Strings are always immutable (unchangable)
27.779 also works
learn about regEx (Regular expression)
best one