fucking-algorithm icon indicating copy to clipboard operation
fucking-algorithm copied to clipboard

刷算法全靠套路,认准 labuladong 就够了!English version supported! Crack LeetCode, not only how, but also why.

Results 336 fucking-algorithm issues
Sort by recently updated
recently updated
newest added

我已阅读过[翻译组工作流程](https://github.com/labuladong/fucking-algorithm/issues/9),我已阅读过[翻译要求](https://github.com/labuladong/fucking-algorithm/blob/english/README.md),我已查看 [已完成列表](https://github.com/labuladong/fucking-algorithm/pulls?q=is%3Apr+is%3Aclosed),确保我要翻译的文章还没有被翻译。 我将开始翻译如下文章(点击可查看目标文章): [动态规划系列/抢房子.md](https://github.com/labuladong/fucking-algorithm/blob/master/动态规划系列/抢房子.md) 我对如何翻译此文章已经心中有数,我准备将它翻译成:**英文** **预计 3 天内翻译完成**,我会尽可能快地完成翻译,主仓库会对第一个完成的 pull request 添加翻译者昵称/姓名及个人链接。

translate

optimize code modify size to Len ` func findKthLargest(nums []int, k int) int { // 小顶堆,堆顶是最小元素 pq := priorityQueue{} for _, e := range nums { // 每个元素都要过一遍二叉堆 pq.offer(e) //...

### 请在提交 bug 之前先搜索 - [X] 我已经搜索过 [issues](https://github.com/labuladong/fucking-algorithm/issues),没有发现相同的 bug。 ### 出错的题目链接 https://leetcode.cn/problems/kth-largest-element-in-an-array/ ### 报错信息 ` // 注意:go 代码由 chatGPT🤖 根据我的 java 代码翻译,旨在帮助不同背景的读者理解算法逻辑。 // 本代码不保证正确性,仅供参考。如有疑惑,可以参照我写的 java 代码对比查看。 func findKthLargest(nums []int, k...

help wanted

### 请在提交 bug 之前先搜索 - [X] 我已经搜索过 [issues](https://github.com/labuladong/fucking-algorithm/issues),没有发现相同的 bug。 ### 出错的题目链接 https://leetcode.cn/problems/open-the-lock/description/ ### 报错信息 TypeError: Solution.plusOne() takes 2 positional arguments but 3 were given ^^^^^^^^^^^^^^^^^^^^ up = self.plusOne(cur, j) Line...

help wanted

### 请在提交 bug 之前先搜索 - [X] 我已经搜索过 [issues](https://github.com/labuladong/fucking-algorithm/issues),没有发现相同的 bug。 ### 出错的题目链接 https://leetcode.cn/problems/serialize-and-deserialize-binary-tree/ ### 报错信息 AttributeError: 'NoneType' object has no attribute 'append' 在python中sb是空列表,不能连续进行append操作,需要分两步进行append,如: sb.append(self.NULL) sb.append(self.SEP) ### 你是否愿意提交 PR 修复这个 bug? -...

help wanted

Fixes #1600 我修改的是如下题目的 golang 解法: https://leetcode.com/problems/implement-stack-using-queues/ 通过截图如下:

### 请在提交 bug 之前先搜索 - [X] 我已经搜索过 [issues](https://github.com/labuladong/fucking-algorithm/issues),没有发现相同的 bug。 ### 出错的题目链接 https://leetcode.com/problems/implement-stack-using-queues/ ### 报错信息 ### 你是否愿意提交 PR 修复这个 bug? - [X] 我愿意!

help wanted

039.组合总和回溯bug修复 Fixes 我修改的是如下题目的 xx 解法: 通过截图如下:

clion:2024.1.2 插件版本:1.8.8 com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'com.labuladong.leetcode.plugin.actions.toolbar.FindTagAction' must override `getActionUpdateThread()` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: leetcode-helper] at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23) at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)...

不开梯子时,进度图标不能显示,同时控制台出现了一个超时的错误 开了梯子,图标才能正常显示