Skip to content

Commit 665b170

Browse files
committed
Added day 5 part 1
1 parent 7f3dc92 commit 665b170

File tree

10 files changed

+1022
-1
lines changed

10 files changed

+1022
-1
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44

55
// project meta data
66
group 'de.havox_design.aoc2015'
7-
version '0.4.0'
7+
version '0.4.1'
88

99
// Switch to gradle "all" distribution.
1010
wrapper {

day05/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Day 5: Doesn't He Have Intern-Elves For This?
2+
Santa needs help figuring out which strings in his text file are naughty or nice.
3+
4+
A **nice string** is one with all of the following properties:
5+
* It contains at least three vowels (`aeiou` only), like `aei`, `xazegov`, or `aeiouaeiouaeiou`.
6+
* It contains at least one letter that appears twice in a row, like `xx`, `abcdde` (`dd`), or `aabbccdd` (`aa`, `bb`,
7+
`cc`, or `dd`).
8+
* It does **not** contain the strings `ab`, `cd`, `pq`, or `xy`, even if they are part of one of the other requirements.
9+
10+
For example:
11+
* `ugknbfddgicrmopn` is nice because it has at least three vowels (`u...i...o...`), a double letter (`...dd...`), and
12+
none of the disallowed substrings.
13+
* `aaa` is nice because it has at least three vowels and a double letter, even though the letters used by different
14+
rules overlap.
15+
* `jchzalrnumimnmhp` is naughty because it has no double letter.
16+
* `haegwjzuvuyypxyu` is naughty because it contains the string `xy`.
17+
* `dvszwmarrgswjxmb` is naughty because it contains only one vowel.
18+
19+
How many strings are nice?
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package de.havox_design.aoc2015.day05;public class NiceStrings {
2+
}

0 commit comments

Comments
 (0)