摘要:
Github Repo:https://github.com/sinkinben/DataStructure.git 本文部分内容参考《算法导论》。 这篇博客也写的很详细:https://www.cnblogs.com/skywang12345/p/3245399.html 红黑树(Red Blac 阅读全文
摘要:
🏆 周赛题目:https://leetcode-cn.com/contest/weekly-contest-207 重新排列单词间的空格 一道简单的模拟题。 首先计算空格个数,其次分割出单词,最后按照要求模拟即可。 class Solution { public: string reorderSp 阅读全文
摘要:
比赛题目:https://leetcode-cn.com/circle/discuss/MwNNcS/ 黑白方格画 题目链接:LCP 22. 黑白方格画。 解题思路 由于 $1 \le n \le 6$,所以可以考虑状态穷举。题目要求的是求出 k 个黑色格子的涂色方案个数,使用一个 map<int, 阅读全文