首先一个很朴素的解法 public class Solution30 { public static List<Integer> findSubstring(String s, String[] words) { List<Integer> res = new ArrayList<>(); int ...
分类:
其他好文 时间:
2020-01-08 00:47:43
阅读次数:
64
``` class Solution { public: vector findSubstring(string s, vector& words) { vector res; if (s.empty() || words.empty()) return res; int n = words.siz... ...
分类:
其他好文 时间:
2019-04-08 21:25:48
阅读次数:
150
@author: ZZQ @software: PyCharm @file: leetcode30_findSubstring.py @time: 2018/11/20 19:14 题目要求: 给定一个字符串 s 和一些长度相同的单词 words。在 s 中找出可以恰好串联 words 中所有单词的 ...
分类:
其他好文 时间:
2018-11-22 14:30:37
阅读次数:
181
public class Main { public static void main(String[] args) { List list = findSubString("awaglknagawybagwkwagl",4); for(String s: list){ System.out.pri... ...
分类:
其他好文 时间:
2018-06-18 11:54:46
阅读次数:
179
class Solution { public List findSubstring(String s, String[] words) { List ret=new ArrayList(); if(words.length==0||words[0].length()==0||s.length()=... ...
分类:
其他好文 时间:
2017-09-23 10:49:31
阅读次数:
188
一、题目描述 In the main() function, after ModifyString(text) is called, what’s the value of ‘text’? 二、分析 FindSubString() 函数就是要找到一个先递增再递减且递增和递减的数量相等的回文序列,例如 ...
分类:
其他好文 时间:
2016-08-18 21:16:43
阅读次数:
116
这道题给我的感觉就是,指针跳过来跳过去,眼花缭乱
大家也来看看
代码如下
#include
using namespace std;
int FindSubString( char* pch )
{
int count = 0;
char * p1 = pch;
while ( *p1 != '\0' )
{
if ( *p1 ==...
分类:
其他好文 时间:
2015-06-04 11:47:52
阅读次数:
177
class Solution {public: vector findSubstring(string S, vector &L) { unordered_mapwordTimes;//L中单词出现的次数 for (int i = 0; i res; for (int i = 0; i wo...
分类:
其他好文 时间:
2015-05-20 23:51:56
阅读次数:
138
这道题给我的感觉就是,指针跳过来跳过去,眼花缭乱
大家也来看看
代码如下
#include
using namespace std;
int FindSubString( char* pch )
{
int count = 0;
char * p1 = pch;
while ( *p1 != '\0' )
{
if ( *p1 =...
分类:
其他好文 时间:
2015-05-18 18:59:33
阅读次数:
120
滑动窗口,但是很繁琐 public class Solution { public ArrayList findSubstring(String S, String[] L) { //http://www.cnblogs.com/springfor/p/3872516.html ...
分类:
其他好文 时间:
2015-04-21 08:20:56
阅读次数:
230