From 9f38ea3a3100e89c02bf5aa1b6068a574d86acea Mon Sep 17 00:00:00 2001 From: Jim Infield Date: Tue, 10 Aug 2021 14:55:56 -0500 Subject: [PATCH] add README --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ff37da --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +## Valid Braces + +Write a function that takes a string of braces, and determines if the order of the braces is valid. It should return `true` if the string is valid, and `false` if it's invalid. + +This Kata is similar to the [Valid Parentheses](https://www.codewars.com/kata/valid-parentheses) Kata, but introduces new characters: brackets `[]`, and curly braces `{}`. Thanks to `@arnedag` for the idea! + +All input strings will be nonempty, and will only consist of parentheses, brackets and curly braces: `()[]{}`. + +**What is considered Valid?** + +A string of braces is considered valid if all braces are matched with the correct brace. + +**Examples** + +```rust +"(){}[]" => True +"([{}])" => True +"(}" => False +"[(])" => False +"[({})](]" => False +```