Algorithm · Capital One · Medium
Requirements Input: an n x m character matrix where every entry is either a digit from '0' through '9', or the symbol '+' or '-'. Starting from any cell, a route may advance only one position right (j -> j+1) or one position downward (i -> i+1). Concatenate the characters encountered to form an expression. Do not consider prefixes that contain either of these patterns: adjacent operators, such as 2 - + 7 or 8 + - 3 adjacent digits, such as 4 9 - 2 or 6 + 1 5 Any expression…
Checking your access…