码迷,mamicode.com
首页 >  
搜索关键字:length within range    ( 30083个结果
查找字符串中第一个不重复的字符
import java.util.*;public class GetFirstNoRepeatChar{ static char getChar(String s){ int len=s.length(); in...
分类:其他好文   时间:2014-06-09 21:36:34    阅读次数:226
调整数组顺序使奇数位于偶数前面
1.维护两个指针,一个指向第一个 ,向右移动,一个指向最后一个元素,向左移动。当第一个指针指向为偶数,第二个为奇数,就进行交换并移动指针。 注意:当输入为Null或者length=0时候的情况。#include "stdafx.h"#include using namespace std;void ...
分类:其他好文   时间:2014-06-09 21:20:21    阅读次数:224
Leetcode::Longest Common Prefix && Search for a Range
一次总结两道题,两道题目都比较基础Description:Write a function to find the longest common prefix string amongst an array of strings.分析: 这道题目最重要的知道什么叫prefix前缀, 否则一不小心就做...
分类:其他好文   时间:2014-06-09 21:08:16    阅读次数:224
[办公应用]如何将excel合并单元格分拆后每个单元格上仍保留数据?
合并单元格虽然美观,但是无法进行排序、筛选等操作。只有合并单元格拆分后才可以按常规进行统计。但是普通拆分后,excel仅保留合并单元格数据到区域左上角的单元格。解决方案:选定多个合并单元格,应用本宏即可每个单元格均保留数据:Sub 拆分() Dim c As Range For Each c In ...
分类:其他好文   时间:2014-06-09 20:04:16    阅读次数:268
LeetCode:Substring with Concatenation of All Words
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatena...
分类:其他好文   时间:2014-06-09 17:49:34    阅读次数:240
手机正则写法
$.validator.addMethod("cnphone", function(value, element, params) { var length = value.length; var mobile = /^(((1(3|4|5|7|8)[0-...
分类:移动开发   时间:2014-06-09 17:48:49    阅读次数:222
JS笔试题
1,考察thisvar length = 10function fn(){ alert(this.length)}var obj = { length: 5, method: function(fn) { fn() // ? arguments[0]()...
分类:Web程序   时间:2014-06-09 16:31:11    阅读次数:293
Network | CIDR
无类别(现在)无类别域间路由(Classless Inter-Domain Routing、CIDR)是一个用于给用户分配IP地址以及在互联网上有效地路由IP数据包的对IP地址进行归类的方法。CIDR用可变长子网掩码 (VLSM,Variable Length Subnet Masking),根据各...
分类:Web程序   时间:2014-06-09 13:14:04    阅读次数:389
[leetcode]Search for a Range @ Python
原题地址:https://oj.leetcode.com/problems/search-for-a-range/题意:Given a sorted array of integers, find the starting and ending position of a given target ...
分类:编程语言   时间:2014-06-08 21:03:21    阅读次数:297
[LeetCode] Longest Substring Without Repeating Characters [15]
题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with the length...
分类:其他好文   时间:2014-06-08 03:06:52    阅读次数:221
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!