会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
cytcnblogs
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2022年5月29日
第79场双周赛
摘要: 这次的周赛总体的题目不难。。。虽然只做了前三道。应该是我个人的问题,困难的都没看,更何况写的是类。。。就没看困难题了。 第一题 题目链接:https://leetcode.cn/problems/check-if-number-has-equal-digit-count-and-digit-valu
阅读全文
posted @ 2022-05-29 03:00 黑VS白-清墨
阅读(20)
评论(0)
推荐(0)
2022年5月20日
2022-5-20 每日一题-leetcode
摘要: 2022-5-19 每日一题-leetcode 题目链接:https://leetcode.cn/problems/find-right-interval/ 个人题解:按照左端点排序,二分找答案。 代码: class Solution { public: vector<int> findRightI
阅读全文
posted @ 2022-05-20 10:24 黑VS白-清墨
阅读(26)
评论(0)
推荐(0)
2022年5月19日
剑指Offer-第17天 排序(中等)
摘要: 第一题 题目链接:https://leetcode.cn/problems/zui-xiao-de-kge-shu-lcof/ 个人题解:设置优先队列,存入 \(k\) 个值,然后弹出即可 代码: class Solution { public: vector<int> getLeastNumber
阅读全文
posted @ 2022-05-19 17:03 黑VS白-清墨
阅读(17)
评论(0)
推荐(0)
2022-5-19 每日一题-leetcode
摘要: 题目链接:https://leetcode.cn/problems/minimum-moves-to-equal-array-elements-ii/ 个人题解:贪心。先排序找到中间值,然后求所有点到中心点的距离之和 代码: class Solution { public: int minMoves
阅读全文
posted @ 2022-05-19 16:58 黑VS白-清墨
阅读(19)
评论(0)
推荐(0)
2022年5月18日
剑指Offer-第16天 排序(简单)
摘要: 第一题 题目链接:https://leetcode.cn/problems/ba-shu-zu-pai-cheng-zui-xiao-de-shu-lcof/ 个人题解:按照字符串相加小的来排序即可 代码: class Solution { public: string minNumber(vect
阅读全文
posted @ 2022-05-18 22:42 黑VS白-清墨
阅读(17)
评论(0)
推荐(0)
剑指Offer-第15天 搜索与回溯算法(中等)
摘要: 第一题 题目链接:https://leetcode.cn/problems/er-cha-shu-zhong-he-wei-mou-yi-zhi-de-lu-jing-lcof/ 个人题解:DFS即可 代码: class Solution { public: vector<vector<int>>
阅读全文
posted @ 2022-05-18 22:25 黑VS白-清墨
阅读(18)
评论(0)
推荐(0)
2022-5-18 每日一题-leetcode
摘要: 题目链接:https://leetcode.cn/problems/kth-smallest-number-in-multiplication-table/ 个人题解:二分查找即可 代码: class Solution { public: int get(int m, int n, int mid)
阅读全文
posted @ 2022-05-18 14:03 黑VS白-清墨
阅读(17)
评论(0)
推荐(0)
2022-5-17 每日一题-leetcode
摘要: 题目链接:https://leetcode.cn/problems/verifying-an-alien-dictionary/ 个人题解:哈希表,遍历,检查前一个和后一个是否按照字典序排列。 代码: class Solution { unordered_map<char,int> hash; pu
阅读全文
posted @ 2022-05-18 13:58 黑VS白-清墨
阅读(47)
评论(0)
推荐(0)
2022年5月16日
剑指Offer-第14天 搜索与回溯算法(中等)
摘要: 第一题 题目链接:https://leetcode.cn/problems/ju-zhen-zhong-de-lu-jing-lcof/ 个人题解: 从 \((0,0)\) 点开始深搜 记录一个长度值 \(u\),如果发现 \(board[x][y]!=u\) 直接退出 如果 \(u==words.
阅读全文
posted @ 2022-05-16 10:38 黑VS白-清墨
阅读(25)
评论(0)
推荐(0)
2022-5-16 每日一题-leetcode
摘要: 题目链接:https://leetcode.cn/problems/successor-lcci/ 个人题解: 先判断是不是在右子树,如果是在右子树的话直接遍历即可。 反之,我们要重建一个 \(node\),从头节点开始遍历。 代码: class Solution { public: TreeNod
阅读全文
posted @ 2022-05-16 10:31 黑VS白-清墨
阅读(28)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告