/images/avatar.jpg

ARST打卡第119周[119/521]

Algorithm lc576_出界的路径数 思路 直接bfs遍历搜索max_count步,然后有出界就+1 但是到达边界之后,它可以出界也可以绕圈,所以到达边界时

ARST打卡第118周[118/521]

Algorithm lc1137_第N个泰波那契数 思路 想到的是直接本地运算,然后打表 打表找规律,然后直接用计算式做 然后发现是要用矩阵快速幂(看题解答案吧) 代码

ARST打卡第116周[116/521]

Algorithm lc-1743_从相邻元素对还原数组 思路 想到的是直接遍历,然后用set找出只出现过一次的两个数,并记录下标,然后选择一个数开始连接 每次都遍

ARST打卡第115周[115/521]

Algorithm leetcode_面试题 10.02. 变位词组 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 class Solution { public: vector<vector<string>> groupAnagrams(vector<string>& strs) { // 可以对每个单词进行sort,然后对比是否有

ARST打卡第114周[114/521]

Algorithm lc274-H指数 简单的思路是先排序再从大到小遍历,但是计数排序更佳 可以看详细题解 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 class Solution { public: int hIndex(vector<int>& citations)