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.
It doesn't matter if it's trivial, the users can't understand which input is valid and which is not. And no, you can't derive from the Kata's instructions that the string should ONLY contain those characters.
The description states, "Your function will take an input string that may contain any of the symbols "()" "{}" or "[]" to create groups."
In other words, the string will only contain those characters. It's trivial to make a single passthrough to remove any other characters, so I didn't think that it added anything to the problem to include them.
This comment is hidden because it contains spoiler information about the solution
Description is loosly defined it only specifies "Your function will take an input string that may contain any of the symbols "()" "{}" or "[]" to create groups.". Nowhere does it state that we should only test for grouping characters nor does it. If this is the purpose it should state it explicity otherwise should add other tests that include other characters.
Agreed, from problem description "Your function will take an input string that may contain any of the symbols "()" "{}" or "[]" to create groups.". Nowhere does it specify that it will only contain grouping symbols. This solution works because of either the problem is badly defined or it's missing test cases.
Most of your calculations are useless, look carefully at the drawing and use the hint.
This comment is hidden because it contains spoiler information about the solution