链接:https://leetcode-cn.com/problems/1nzheng-shu-zhong-1chu-xian-de-ci-shu-lcof/ 代码: class Solution { public: int countDigitOne(int n) { vector<int> nu ...
分类:
其他好文 时间:
2020-03-04 14:25:11
阅读次数:
58
链接:https://leetcode-cn.com/problems/lian-xu-zi-shu-zu-de-zui-da-he-lcof/submissions/ 代码: class Solution { public: int maxSubArray(vector<int>& nums) { ...
分类:
编程语言 时间:
2020-03-04 14:19:07
阅读次数:
60
题目: 链接:https://leetcode-cn.com/problems/sentence-screen-fitting/ 给你一个 rows x cols 的屏幕和一个用 非空 的单词列表组成的句子,请你计算出给定句子可以在屏幕上完整显示的次数。 注意: 一个单词不能拆分成两行。 单词在句子 ...
分类:
其他好文 时间:
2020-03-04 09:45:34
阅读次数:
108
题目链接:https://leetcode-cn.com/problems/ti-huan-kong-ge-lcof/ 请实现一个函数,把字符串 s 中的每个空格替换成"%20"。 示例 1: 输入:s = "We are happy." 输出:"We%20are%20happy." 限制: 0 < ...
分类:
其他好文 时间:
2020-03-04 00:32:40
阅读次数:
78
题目链接:https://leetcode-cn.com/problems/cong-wei-dao-tou-da-yin-lian-biao-lcof/ 输入一个链表的头节点,从尾到头反过来返回每个节点的值(用数组返回)。 示例 1: 输入:head = [1,3,2]输出:[2,3,1] 限制: ...
分类:
其他好文 时间:
2020-03-04 00:14:24
阅读次数:
56
题目链接:https://leetcode-cn.com/problems/fan-zhuan-lian-biao-lcof/ 定义一个函数,输入一个链表的头节点,反转该链表并输出反转后链表的头节点。 示例: 输入: 1->2->3->4->5->NULL输出: 5->4->3->2->1->NUL ...
分类:
其他好文 时间:
2020-03-04 00:03:54
阅读次数:
63
https://leetcode-cn.com/problems/n-queens/solution/hui-su-suan-fa-xiang-jie-by-labuladong/ 这篇文章是很久之前的一篇《回溯算法详解》的进阶版,之前那篇不够清楚,就不必看了,看这篇就行。把框架给你讲清楚,你会发现 ...
分类:
编程语言 时间:
2020-03-03 22:26:36
阅读次数:
96
题目链接:https://leetcode-cn.com/problems/sum-lists-lcci/ 给定两个用链表表示的整数,每个节点包含一个数位。 这些数位是反向存放的,也就是个位排在链表首部。 编写函数对这两个整数求和,并用链表形式返回结果。 示例: 输入:(7 -> 1 -> 6) + ...
分类:
其他好文 时间:
2020-03-03 10:40:22
阅读次数:
53
Polycarp is preparing the first programming contest for robots. There are nn problems in it, and a lot of robots are going to participate in it. Each ...
分类:
其他好文 时间:
2020-03-03 09:16:12
阅读次数:
84
【不定时更新,赶论文,赶项目,1月~2月做题记录还在整理,自我训练】 反转链表 链接:https://leetcode cn.com/problems/reverse linked list/ 类名: 考察点:链表、迭代、递归 解题过程: 力扣3月每日1题,题解链接: https://leetcod ...
分类:
其他好文 时间:
2020-03-03 00:58:58
阅读次数:
87