File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,11 @@ def part_one(self) -> int:
9
9
def part_two (self ) -> int :
10
10
return self .get_start_of_packet_marker (distinct_characters = 14 , input = self .puzzle_input )
11
11
12
- @staticmethod
13
- def get_start_of_packet_marker (distinct_characters : int , input : list ) -> int :
14
- for index , _ in enumerate (input ):
15
- range = input [index :index + distinct_characters ]
16
-
17
- if len (set (range )) == len (range ):
18
- return (index + distinct_characters )
12
+ @staticmethod
13
+ def get_start_of_packet_marker (distinct_characters : int , input : list ) -> int :
14
+ for index , _ in enumerate (input ):
15
+ if len (set (input [index :index + distinct_characters ])) == distinct_characters :
16
+ return (index + distinct_characters )
19
17
20
18
@staticmethod
21
19
def load_input () -> list :
You can’t perform that action at this time.
0 commit comments