1 | package com.adventofcode.day06 | |
2 | ||
3 | class Person(responses: String) { | |
4 | ||
5 | val answers = responses.toCharArray().distinct().filter { it.toLowerCase() in 'a'.rangeTo('z')} | |
6 | ||
7 | fun questionAnswered(): Int { | |
8 |
1
1. questionAnswered : replaced int return with 0 for com/adventofcode/day06/Person::questionAnswered → KILLED |
return answers.size |
9 | } | |
10 | ||
11 | override fun toString(): String { | |
12 |
1
1. toString : replaced return value with "" for com/adventofcode/day06/Person::toString → KILLED |
return answers.joinToString("") |
13 | } | |
14 | } | |
Mutations | ||
8 |
1.1 |
|
12 |
1.1 |