I just submitted the exact same algorithm written in Java and in bash (produces the same result with the same method). It was accepted in Java, but not in bash.
It’s a really simple piece of code. It works as expected on my bash.
What am I doing wrong ?
thanks