不是双指针 想知道哪里错了
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int flag = 0; string s1,s2; ci……
优质题解
最长不含重复字符的子字符串-题解(C/C++)你一定看的懂的过程讲解
摘要:思路是参考的。
首先题目要求不重复的最大长度字符串,乍一想很复杂,而且就算会写,可能超时。
突破点在于:**字符串最大长度……
最长不含重复字符的子字符串-题解(C语言代码)
摘要:```c
#include
#include
int insert_char(char *a,char c){
int len=(int)strlen(a),i,j;
a[l……
最长不含重复字符的子字符串-题解(C++尺取法)
摘要:#include<bits/stdc++.h>
using namespace std;
signed main() {
string s;
cin>>s;
int res=-1;
……
使用队列思想解题(JAVA代码)
摘要:解题思路:* 思路: * * 整个字符串可以看成很多段无重复的字串重叠拼接而成 * 只要筛选出最长的字串就可以了 * 如:asdfgdfg 字串是:asdfg,fgd,gdf,dfg * *……
最长不含重复字符的子字符串 (Java代码)
摘要:import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Sca……