首先,我们要在页面的最上方引用: <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> ? 下面是JSTL中自带的方法列表以及其描述?: ? fn:contains(string, substring) 假如参数string中...
分类:
Web程序 时间:
2015-04-28 12:10:39
阅读次数:
157
网址:https://leetcode.com/problems/longest-substring-without-repeating-characters/
题意:
求出最长子字符串且不含重复字符
分析:
题意比较简单
只需要注意字符串为空的特殊情况.
字符是char的0-255,不仅仅是26个小写字母.
解法:
一直统计长度,直到有字符被重复为止,再记录被重复的字符的下一位...
分类:
其他好文 时间:
2015-04-27 23:49:44
阅读次数:
126
题目:LeetCode 003 Longest Substring Without Repeating Characters题意:给一个字符串,找到一个没有重复字符的最长子串。样例:”bbbbb” 返回”b”的长度1;”abcabcbb”返回”abc”的长度3。思路:动态规划。dp[i]表示以第i个...
分类:
其他好文 时间:
2015-04-26 18:15:18
阅读次数:
117
1.string相关函数我分别尝试了compare substring split函数,如上图示。compare函数会比较输入是两个string,然后返回一个int值显示结果。substring可以读取string里的一部分,(开始索引,索引个数)。split可以对string按照给出的条件分割。2...
Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palindromic substring.
基本思路:回文字符串显然有个特征是沿...
分类:
其他好文 时间:
2015-04-26 16:51:58
阅读次数:
142
Substring with Concatenation of All Words
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concaten...
分类:
其他好文 时间:
2015-04-25 22:50:17
阅读次数:
158
原题:Given a string, find the length of the longest substring without repeating characterFor example, the Longest substring without repeating letters fo...
分类:
编程语言 时间:
2015-04-25 22:41:48
阅读次数:
229
问题描述:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique l...
分类:
编程语言 时间:
2015-04-25 14:54:13
阅读次数:
145
问题描述:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating lette...
分类:
编程语言 时间:
2015-04-25 14:50:46
阅读次数:
131
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:
编程语言 时间:
2015-04-25 12:09:43
阅读次数:
158