package
0.0.0-20241203221615-453487caf131
Repository: https://github.com/glstephen/kaizen.git
Documentation: pkg.go.dev

# README

--- Day 5: Doesn't He Have Intern-Elves For This? --- Santa needs help figuring out which strings in his text file are naughty or nice.

A nice string is one with all of the following properties:

It contains at least three vowels (aeiou only), like aei, xazegov, or aeiouaeiouaeiou. It contains at least one letter that appears twice in a row, like xx, abcdde (dd), or aabbccdd (aa, bb, cc, or dd). It does not contain the strings ab, cd, pq, or xy, even if they are part of one of the other requirements. For example:

ugknbfddgicrmopn is nice because it has at least three vowels (u...i...o...), a double letter (...dd...), and none of the disallowed substrings. aaa is nice because it has at least three vowels and a double letter, even though the letters used by different rules overlap. jchzalrnumimnmhp is naughty because it has no double letter. haegwjzuvuyypxyu is naughty because it contains the string xy. dvszwmarrgswjxmb is naughty because it contains only one vowel. How many strings are nice?

Requirements

  • A NICE STRING is one WITH ALL of the following properties
  • It contains AT LEAST three vowels (aeiou only), like aei, xazegov, or aeiouaeiouaeiou.
  • It contains AT LEAST one letter that appears twice in a row, like xx, abcdde (dd), or aabbccdd (aa, bb, cc, or dd).
  • DOES NOT CONTAIN the strings ab, cd, pq, or xy, even if they are part of one of the other requirements.

Bonus

Need to get smarter: https://stackoverflow.com/questions/1660694/regular-expression-to-match-any-character-being-repeated-more-than-10-times