leetcode icon indicating copy to clipboard operation
leetcode copied to clipboard

LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)

Results 22 leetcode issues
Sort by recently updated
recently updated
newest added

西法最近在帮大家研发一个leetcode刷题小助手,已经有雏形,请围观https://github.com/leetcode-pp/leetcode-cheat (目前暂时仅对91用户开放)。 现在需要大家贡献自己面试当中遇到的leetcode原题或类似题目。 1. 你的每一次贡献,我们都会记录到该题的贡献者和项目贡献者,成为开源项目的Contributor。 2. 不要低估星星之火的,大家零星的力量汇聚而成的工具,会反哺大家以后更容易的“划重点”找工作。 请大家参考以下面这种形式,感恩🙇🙏。 > 格式:以[]包裹,半角逗号隔开。 > [题目序号.名称,公司,原题or类似题],放在issue文案第一行。

help wanted

虽然用Kruskal算法没有错,但实际在leetcode跑test case会超时。

bug
help wanted

给定一个用 n*m 矩阵表示的群岛的地图,其中 1 表示岛屿, 0 表示海洋,每个岛屿的水平或竖直方向相邻的岛屿可以视为连在一起的岛屿,每一块岛屿视为面积为 1 ,请问面积最大的岛屿是多少?

Daily Question

[anything] 题目地址:xxxxxx

Daily Question

``` class Solution: def bfs(k): # 使用双端队列,而不是数组。因为数组从头部删除元素的时间复杂度为 N,双端队列的底层实现其实是链表。 queue = collections.deque([root]) # 记录层数 steps = 0 # 需要返回的节点 ans = [] # 队列不空,生命不止! while queue: size = len(queue) # 遍历当前层的所有节点...

Daily Question