Working part 2 solution

This commit is contained in:
2024-12-13 16:35:36 +08:00
parent 3764b25f6d
commit beac193288
3 changed files with 47 additions and 23 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
FUNCNEST=99999
FILE=test-input-1
FILE=input
read -r -a MAP_ARRAY <<< "$( < "$FILE" paste -s -d "" | sed -E 's/(.)/\1\ /g' )"
MAP_LEN=${#MAP_ARRAY[@]}
MAP_WIDTH=$(( $( head -1 "$FILE" | wc -c ) -1 ))