- If not a number or period then it is a special character
Each line parsed need to collect all numbers.
Can't know whether a collected number is a part number until we
have also parsed the proceeding or following line.
```text
467..114..
...*......
..35..633.
......#...
617*......
```
After parsing first line we would have `467` with start index 0 and end index 2 and `114` with start index 5 and end index 7.
For 467 to be a part number it needs to have a special character at index 3 or it needs to have a special character at index 1, 2, 3, 4 on the next line.
For 114 to be a part number it needs to have a special character at index 4 or index 8 or it needs to have a special character at index 4, 5, 6, 7 on the next line.
Need to keep track of:
- Previous line - will start as empty
- Current line
- Next line
So you look at the current line and you parse all the numbers with their start and end index. You also parse all special characters with their index.
Then you end up with something like this: currentLine
If not then you need to see if there is a previous line and whether there is a special character at on the previous line that has an index that is between 1 less than the start index and 1 more than the end index.
If not then you need to see if there is a next line and whether there is a special character at on the next line that has an index that is between 1 less than the start index and 1 more than the end index.