leetcode
小P峰
这个作者很懒,什么都没留下…
展开
-
CountAndSay
题目: The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as原创 2015-04-07 19:15:34 · 399 阅读 · 0 评论 -
TwoSum
题目: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target原创 2015-04-07 15:47:15 · 264 阅读 · 0 评论 -
AddTwoNumbers
ListNode *addTwoNumbers(ListNode *l1, ListNode *l2) { int val1, val2, carry = 0; int sum; ListNode *s; ListNode *node = NULL; ListNode *head = (ListNode*)malloc(sizeof(ListNode)); //head-原创 2015-04-08 20:05:45 · 279 阅读 · 0 评论