issues Search Results · repo:youngyangyang04/leetcode-master language:Shell
Filter by
271 results
(48 ms)271 results
inyoungyangyang04/leetcode-master (press backspace or delete to remove)这道题目的意思应该是计算孤岛个数吧,根据题意, 对于 5 6 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 这个输入,应该输出是1.
但是按照卡哥的代码,输出会是2,问题就出在应该是找到==1的陆地后,继续进行dfs,而不是直接count++
Jay-Chou118
- 1
- Opened 14 days ago
- #2957
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next();
StringBuilder sb = new ...
stahol-14
- Opened 17 days ago
- #2956
https://github.com/youngyangyang04/leetcode-master/blob/master/problems/0028.%E5%AE%9E%E7%8E%B0strStr.md “再来看一下如何利用
前缀表找到 当字符不匹配的时候应该指针应该移动的位置。如动画所示:” 下面的图有问题
luchao2424631502
- Opened 25 days ago
- #2951
也是使用滑动窗口方法.
class Solution:
def minSubArrayLen(self, target: int, nums: List[int]) - int:
i = 0
j = 0
s = 0
r = len(nums) + 1 # a sufficient large number to indicate ...
LogicFan
- Opened on Jun 3
- #2946
目前版本的【输入示例】: 3 3 1 2 3 2 1 3 1 2 3
按照解题思路和解题代码,【输入示例】是否应该为: 3 3 1 2 3 2 1 3 1 2 3
boat2moon
- Opened on May 31
- #2945
lingaoliu105
- Opened on May 30
- #2944
C++中map、set、multimap,multiset的底层实现都是基于红黑树的,红黑树和二叉平衡搜索树有很大区别的,尤其是在保持平衡这个方面
wjm-lzy
- Opened on May 23
- #2943
感觉算法竞赛版本的KMP算法更加精简,更好理解 采用字符串拼接方法,只需找到pi[i] == m的位置 附上解释链接:https://oi-wiki.org/string/kmp/
class Solution {
public int strStr(String haystack, String needle) {
int n = haystack.length();
...
zerd1y
- Opened on May 16
- #2939
位置:哈希表-四数之和-Java版本答案 修改1:
- 原代码第7行:
for (int k = 0; k nums.length; k++) {
- 原代第16行:
for (int i = k + 1; i nums.length; i++) {
会导致数组越界,应分别改成
for (int k = 0; k nums.length - 3; ...
zerd1y
- Opened on May 12
- #2938

Learn how you can use GitHub Issues to plan and track your work.
Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub IssuesProTip!
Restrict your search to the title by using the in:title qualifier.
Learn how you can use GitHub Issues to plan and track your work.
Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub IssuesProTip!
Restrict your search to the title by using the in:title qualifier.