![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Leetcode题解
文章平均质量分 67
!柯西洗袜子
╰(:з╰∠)_
展开
-
【c++】遍历容器,哪一种方法速度最快?
可以看到这场比赛,匿名函数输得一塌糊涂,反而是朴实无华的for夺魁!我们一眼就看到了容器的遍历!终于有一个简单的每日一题!写完的时候甚至代码还没有编译结束!探究一下一直以来的一些疑惑:对容器的遍历。–没写完,代码跑完了,一会儿干完活再写。原创 2023-10-23 17:29:36 · 339 阅读 · 0 评论 -
类欧几里得 之 如何对具有和约束关系的两数求组合数
摸鱼者,假装写代码实则写博客也原创 2023-09-04 18:44:19 · 78 阅读 · 0 评论 -
[c++]力扣303+304 区域和检索 二维区域和检索
abandon原创 2022-10-11 21:08:15 · 426 阅读 · 0 评论 -
[c++] 力扣763 划分字母区间
字符串S由小写字母组成. 我们要把这个字符串划分为尽可能多的片段, 同一字母最多出现在一个片段中. 返回一个表示每个字符串片段的长度的列表.示例输入: S = “ababcbacadefegdehijhklij”输出: [9, 7, 8]解释:划分结果为"ababcbaca", “defegde”, “hijhklij”每个字母最多出现在一个片段中. 像"ababcbacadefegde", “hijhklij” 的划分是错误的, 因为划分的片段较少.提示S的长度在[1, 500]之间原创 2022-04-23 18:24:10 · 893 阅读 · 0 评论 -
[LeetCode刷题笔记(C++)]1523+1491
目录1523 在区间范围内统计奇数一些关于位运算速度的小问题1491 去掉最低工资和最高工资后的平均工资没抵挡住诱惑转c++了,以后的题都用c++写…1523 在区间范围内统计奇数给你两个非负整数 low和 high。请你返回 low和 high之间(包括二者)奇数的数目。题目链接是简单题,一行代码class Solution {class Solution {public: int countOdds(int low, int high) { return ((hi原创 2022-02-27 16:49:47 · 724 阅读 · 0 评论 -
[LeetCode刷题笔记(C语言)] 01 - Two Sum
原题链接:Two Sum题目原文:Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may...原创 2019-03-14 20:25:00 · 505 阅读 · 1 评论 -
[LeetCode刷题笔记(C语言)] 02 -Add Two Numbers
原题链接: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 t...原创 2019-03-30 18:16:36 · 169 阅读 · 0 评论 -
[Leetcode刷题笔记(C语言)] 03 - Longest Substring Without Repeating Characters
原题链接:Longest Substring Without Repeating Characters题目原文:Given a string, find the length of the longest substring without repeating characters.Example 1:Input: "abcabcbb"Output: 3 Explanation: T...原创 2019-04-08 18:02:38 · 196 阅读 · 0 评论 -
[LeetCode刷题笔记(C语言)]04 - Median of Two Sorted Arrays
题目链接:Median of Two Sorted Arrays题目原文:There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(l...原创 2020-02-16 22:39:12 · 128 阅读 · 0 评论