当前位置 : 主页 > 手机开发 > harmonyos >

leetcode-282-Expression Add Operators

来源:互联网 收集:自由互联 发布时间:2023-08-26
Error: Do not know how to do, the tricky part is: 1) Hard to handle the first number 2) Hard to mult. So we use for loop, to apart each number, then store the number. And handle “+ - *”. Need to take care of the previous number, in func


Error:
Do not know how to do, the tricky part is: 1) Hard to handle the first number 2) Hard to mult.

So we use for loop, to apart each number, then store the number. And handle “+ - *”.

Need to take care of the previous number, in func, we are storing previous result, not previous number, so we need to store -num, num, prev * num rather than num


网友评论