Read this: https://docs.codewars.com/training/troubleshooting/ you're doing recursion wrong and also don't use global vars, read why in the docs.
Actually, something weird happened with if/else. When I used the ternary operator, the code worked real fine.
This comment is hidden because it contains spoiler information about the solution
Loading collection data...
Read this: https://docs.codewars.com/training/troubleshooting/ you're doing recursion wrong and also don't use global vars, read why in the docs.
Actually, something weird happened with if/else. When I used the ternary operator, the code worked real fine.
This comment is hidden because it contains spoiler information about the solution