chars to its corresponding value in vals.curr_sum) and maximum sum (max_sum) to 0.s.
a. If the character is in the dictionary, use the mapped value; otherwise, use its 1-indexed alphabetical position as its value.
b. Add the value to curr_sum.
c. If curr_sum is greater than max_sum, update max_sum.
d. If curr_sum becomes negative, reset it to 0.max_sum if it's positive; otherwise, return 0.