刷leetcode,看到一个算法,给大神跪了。。。。看了半天才明白,下面谈谈理解 这道题最朴素的想法,就是两层遍历: 1、第一层遍历所有字符,表示以每一位置的字符打头的子串; 2、第二层,以某一位置字符开头,向后遍历,可以用map容器插入操作判断是否有重复字符,并计算长度; 3、这样做的话,实际上是 ...
分类:
其他好文 时间:
2016-04-15 21:54:33
阅读次数:
233
<?php
namespaceIlluminate\Console\Scheduling;
useIlluminate\Console\Command;
//namespaceisverygood,likeadirorafolder
classScheduleRunCommandextendsCommand
{
/**
*Theconsolecommandname.
*
*@varstring
*/
protected$name=‘schedule:run‘;//ScheduleRunCommand..
分类:
其他好文 时间:
2016-04-14 12:28:00
阅读次数:
160
<?php
namespaceIlluminate\Console\Scheduling;
useSymfony\Component\Process\ProcessUtils;
useSymfony\Component\Process\PhpExecutableFinder;
//usenamespace.
classSchedule
{
/**
*Alloftheeventsontheschedule.
*
*@vararray
*/
protected$events=[];//eventssch..
分类:
其他好文 时间:
2016-04-13 09:50:45
阅读次数:
415
<?php
namespaceIlluminate\Console\Scheduling;
useClosure;
useCarbon\Carbon;
useLogicException;
useCron\CronExpression;
useGuzzleHttp\ClientasHttpClient;
useIlluminate\Contracts\Mail\Mailer;
useSymfony\Component\Process\Process;
useSymfony\Component\Pro..
分类:
其他好文 时间:
2016-04-11 10:25:56
阅读次数:
178
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo ...
分类:
其他好文 时间:
2016-04-11 07:10:54
阅读次数:
133
计算最长的无重复字符的串长 用HashMap记住重复的单词及其位置。当重复时,让tempStart指针移到重复位置+1,如果start指针小于tempStart,则更新start指针,长度就是当前重复的位置 - start。读到字符串末尾时还需要判断一次 ...
分类:
其他好文 时间:
2016-04-10 12:54:35
阅读次数:
112
3. Longest Substring Without Repeating Characters Given a string, find the length of the longest substring without repeating characters. For example, ...
分类:
其他好文 时间:
2016-04-09 12:15:03
阅读次数:
110
<?php
namespaceIlluminate\Console\Scheduling;
useLogicException;
useInvalidArgumentException;
useIlluminate\Contracts\Container\Container;
//namespacetouse
classCallbackEventextendsEvent
{
/**
*Thecallbacktocall.
*
*@varstring
*/
protected$callback;//T..
分类:
其他好文 时间:
2016-04-08 15:32:57
阅读次数:
231
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo ...
分类:
其他好文 时间:
2016-03-28 10:32:52
阅读次数:
119