- Add numbers: definitely go in the REVERSE order;
for(A;B;C)
: satisfyingA
andB
: go intofor
; then executeC
.carry > 0
inside for: whencarry == 0
andi<0, j<0
: no need going intofor
loop;
1 | public String addStrings(String num1, String num2) { |