描述Many databases store the data in the character fields (and especially indices) using prefix compression. This technique compresses a sequence of strings A1, …, AN by the following method: if there ar...
分类:
其他好文 时间:
2015-05-06 15:13:26
阅读次数:
319
一:leetcode 204 Count Primes
题目:
Description:
Count the number of prime numbers less than a non-negative number, n
分析:此题的算法源码可以参看这里,http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
代码:
cl...
分类:
其他好文 时间:
2015-05-06 15:06:39
阅读次数:
162
题目:Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".代码:class Solution {public: string addBina...
分类:
其他好文 时间:
2015-05-06 10:53:29
阅读次数:
107
https://leetcode.com/problems/add-binary/Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100". 1 imp...
分类:
其他好文 时间:
2015-05-06 06:49:57
阅读次数:
150
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2015-05-05 23:42:33
阅读次数:
168
使用typedef语句定义数组类型
1. 一维数组类型的定义格式
typedef [];
例如:
(1) typedef int vector[10];
(2) typedef char strings[80];
(3) typedef short int array[N];
第一条语句定义了一个元素类型为int,含有1...
分类:
编程语言 时间:
2015-05-05 19:34:34
阅读次数:
117
package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
iconv "github.com/djimenez/iconv-go"
)
//获取指定目录下的所有文件,不进入下一级目录搜索,可以匹配后缀过滤。
func Lis...
分类:
其他好文 时间:
2015-05-05 17:00:52
阅读次数:
114
Isomorphic Strings问题:Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett....
分类:
其他好文 时间:
2015-05-05 15:58:19
阅读次数:
115
https://leetcode.com/problems/longest-common-prefix/Write a function to find the longest common prefix string amongst an array of strings 1 public cla...
分类:
其他好文 时间:
2015-05-04 23:58:12
阅读次数:
271
NoSQL 使用场景:1.对数据高并发读写2.对海量数据的高效率存储和访问3.对数据的高可扩展性和高可用性Redis 通常被称为数据结构服务器,因为键可以包含字符串(strings)、哈希(hashes)、链表(lists)、集合(sets)和有序集合(sorted sets)。链表可以做成栈(先进...
分类:
其他好文 时间:
2015-05-04 23:46:38
阅读次数:
262