![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
文章平均质量分 77
小函数
这个作者很懒,什么都没留下…
展开
-
leetcode算法训练#2 Add Two Numbers
题目大意: 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 i原创 2016-05-11 22:23:43 · 269 阅读 · 0 评论 -
leetcode算法训练#1 Two Sum
题目的大概意思是在一个无序数组中找到两个数字的下标,使得这两个数字的和刚好为指定数。 最简单的解是暴力搜索法,代码如下: class Solution { public: vector twoSum(vector& nums, int target) { for (unsigned int i = 0;i for (unsigned int t = i+1;t { if (nu原创 2016-05-09 22:25:08 · 300 阅读 · 0 评论