you are given two linked lists representing two non-negative numbers. the digits are stored in reverse order and each of their nodes contain a single digit. add the two numbers and return it as a linked list.
input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
output: 7 -> 0 -> 8
总结:指针操作还是要多练习。
total accepted: 12531 total
submissions: 38495
you are climbing a stair case. it takes n steps to reach to the top.
each time you can either climb 1 or 2 steps. in how many distinct ways can you climb to the top?