#!/usr/bin/env ruby
require_relative '../common'
class Day06 < Day
def part1
find_marker 4
end
def part2
find_marker 14
private
def find_marker(size)
size + stdin.join.chars.each_cons(size).find_index { |chars| chars == chars.uniq }
Day06.run