![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
文章平均质量分 83
Mooney安
路过的一只小白菜
展开
-
[leetcode]Add Two Numbers 两数相加(链表)
题目:You are given two non-empty linked lists representing two non-negative integers. 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.You may assume the two numbers d原创 2020-08-18 18:10:31 · 163 阅读 · 0 评论 -
【leetcode刷题】1、Two Sum两数之和
突然想重刷下之前刷过的leetcode的题,记录下自己的解题思路,以及不同的方法给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。Givennums = [2, 7, 11, 15], target = 9,Becausenums[0] + nums[1] = 2 + 7 = 9,return [0, 1].解法一:最普通,常规的解法,像排序原创 2020-08-10 14:56:10 · 146 阅读 · 0 评论