diff --git a/algorithms/string.md b/algorithms/string.md index a6dc8e7d..247aea05 100644 --- a/algorithms/string.md +++ b/algorithms/string.md @@ -4,7 +4,7 @@ String - Output list of strings representing a page of hostings given a list of CSV strings. - Given a list of words, find the word pairs that when concatenated form a palindrome. - Find the most efficient way to identify what character is out of place in a non-palindrome. -- Implement a simple regex parser which, given a string and a pattern, returns a boolean indicating whether the input matches the pattern. By simple, we mean that the regex can only contain special character: `*` (star), `.` (dot), `+` (plus). The star means that there will be zero or more of previous character in that place in the pattern. The dot means any character for that position. The plus means one or more of previous character in that place in the pattern. +- Implement a simple regex parser which, given a string and a pattern, returns a boolean indicating whether the input matches the pattern. By simple, we mean that the regex can only contain the following special characters: `*` (star), `.` (dot), `+` (plus). The star means that there will be zero or more of the previous character in that place in the pattern. The dot means any character for that position. The plus means one or more of previous character in that place in the pattern. - Find all words from a dictionary that are x edit distance away. - Given a string IP and number n, print all CIDR addresses that cover that range. - Write a function called `eval`, which takes a string and returns a boolean. This string is allowed 6 different characters: `0`, `1`, `&`, `|`, `(`, and `)`. `eval` should evaluate the string as a boolean expression, where `0` is `false`, `1` is `true`, `&` is an `and`, and `|` is an `or`.