flagstar的贷款靠谱吗?# Living
c*t
1 楼
2.4 You have two numbers represented by a linked list, where each node
contains a single digit. The digits are stored in reverse order, such that
the 1’s digit is at the head of the list. Write a function that adds the
two numbers and returns the sum as a linked list.
1. 感觉这个递归,没有考虑 l1 == null && l2 == null, 但是carry==1的情形,这种
情况,还应该加个高位1
2. 应该是value>=10,就应该有进位carry,给的答案是>10
谢谢!
contains a single digit. The digits are stored in reverse order, such that
the 1’s digit is at the head of the list. Write a function that adds the
two numbers and returns the sum as a linked list.
1. 感觉这个递归,没有考虑 l1 == null && l2 == null, 但是carry==1的情形,这种
情况,还应该加个高位1
2. 应该是value>=10,就应该有进位carry,给的答案是>10
谢谢!