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.
same
Wow !
What a solution!
It's beyond 8 kyu I believe.
Also, some of the test are wrong as mentioned like:
1,3,1 the result is 5 while 3*(1+1)=6 ?
I Think this is a really good solution
I knew that there is a really easy way with idiomatic rust but I wanted to see if I can solve it without looking anywhere with basic syntax.
Agreed
It's not a best practice though, if there is a unwrap there is no best practice imo
Bad Kata and Bad Description.
I don't know if it's the best practice or not but I meet the strings.Builder concept, thanks
In Golang we don't even have char.
"char" you created in your loop, represents a rune (an int32 value) of the string, not a byte or character. A rune is a code point in the Unicode character set.
When it checks char < '5' it compares the rune values
for example:
0 represents: 48
1 represents: 49
...
It compare with them like that
So your solution is correct but your fundamentals are wrong.