Expression Add Operations[经典!]

Expression Add Operations[经典!]_第1张图片

Excellent Solution。 最大的tricky是1:  long cur = Long.parseLong...把String变成一个数这样才能拿去eval

if num.charAt(pos)==0. break。

0 sequence: because we can't have numbers with multiple digits started with zero, we have to deal with it too.

第二个是eval -multed + multed*cur.

Expression Add Operations[经典!]_第2张图片

你可能感兴趣的:(Expression Add Operations[经典!])