function?GetUrlParms()?{
var?args?=?new?Object();
var?query?=?window.location.search.substring(1);//?获取查询串
var?pairs?=?query.split("&");//?在逗号处断开
for?(var?i?=?0...
分类:
Web程序 时间:
2015-09-20 16:24:18
阅读次数:
130
翻译给定一个字符串S,找出它的最大回文子字符串。
你可以假定S的最大长度为1000,
并且这里存在唯一一个最大回文子字符串。原文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 on...
分类:
其他好文 时间:
2015-09-20 14:48:24
阅读次数:
154
Question:Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the fa...
分类:
其他好文 时间:
2015-09-20 14:29:30
阅读次数:
111
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) insthat is a concatena...
分类:
其他好文 时间:
2015-09-20 14:27:23
阅读次数:
131
1.StringBuffer的截取功能:public String subString(int Start):public String subString(int Start, int end):返回类型是String类型,和前面几个功能不一样,本身没有发生变化。2. 案例演示: 1 packag...
分类:
编程语言 时间:
2015-09-19 21:15:52
阅读次数:
190
1.substring 方法定义和用法substring 方法用于提取字符串中介于两个指定下标之间的字符。语法stringObject.substring(start,stop)参数 描述start 必需。一个非负的整数,规定要提取的子串的第一个字符在 stringObject 中的位置。sto.....
分类:
编程语言 时间:
2015-09-19 18:14:13
阅读次数:
142
以下都是网上整理出来的JS面试题,答案仅供参考。/2,截取字符串abcdefg的efg//alert('abcdefg'.substring(4));//3,判断一个字符串中出现次数最多的字符,统计这个次数/*var str = 'asdfssaaasasasasaa';var json = {};...
分类:
Web程序 时间:
2015-09-18 18:36:11
阅读次数:
168
题目来源:https://leetcode.com/problems/longest-common-prefix/题意分析: 这道题目是要写一个函数,找出字符串组strs的最长公共前缀子字符串。题目思路: 这都题目的难度是简单。从字符串头部开始计算,初始化公共前缀子字符串是strs[0],公共子.....
分类:
编程语言 时间:
2015-09-18 13:53:58
阅读次数:
177
#include #include int MAX_SIZE = 100000;int gen_odd_str(const char * str, char * odd_str) { int i = 0; for (i = 0; *str != 0 ; ++i, ++str) { ...
分类:
其他好文 时间:
2015-09-18 13:46:56
阅读次数:
108
O(nlgn) with repeated numbers.. Please note the extra repeat count array:class Solution {public: /** * @param nums: The integer array * @re...
分类:
其他好文 时间:
2015-09-18 07:04:44
阅读次数:
199