LeetCode
dandelion1_1
谁能书阁下,白首太玄经。
展开
-
LeetCode 1.两数之和
给定 nums = [2, 7, 11, 15], target = 9 因为 nums[0] + nums[1] = 2 + 7。来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/two-sum。= 9 所以返回 [0, 1]原创 2019-07-20 11:54:53 · 115 阅读 · 1 评论 -
LeetCode 2.两数相加
题目给出了两个非空链表,并且每个链表里面都逆序存放着一个数字,我们的任务是把这两个数字从链表里面取出来,把这两个数字相加,得到结果,再逆序存放到一个新的链表中去,最后在函数中返回这个新的链表。来源:力扣(LeetCode) 链接:https://leetcode.cn/problems/add-two-numbers/输入:(2 -> 4 -> 3) + (5 -> 6 -> 4)原因:342 + 465 = 807。输出:7 -> 0 -> 8。原创 2019-07-22 18:37:54 · 101 阅读 · 1 评论