6.2 Notes

18. The sum of the number four: consider the sum of n and a number reduced to plus and the n-1 number of issues, in descending order, the minimum is two and the number of questions, two and the number of problems easier to solve. Through new target = target - nums [i] parameter modification nsum call again () method that is recursive.
234. palindromic list: speed pointers, pointer with slow traverse res digital storage inverted, when come to the tail pointer is fast, and the determination value res.val slow.val are equal.

Guess you like

Origin blog.csdn.net/sinat_35325378/article/details/90738067