Thanks Homer.

  • learningduck@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    I don’t want to read the number string from both left to right and Ruth to left. So, I

    1. iterate through each row and read the number string from left to right
    2. Store each number along with its cell range. ie: 467 is 0-2.
    3. Then from each symbol, find out if the position of the symbol +/-1 falls into any range. If so then sum that number.