Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri...
分类:
其他好文 时间:
2014-06-18 21:56:47
阅读次数:
209
Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ],...
分类:
其他好文 时间:
2014-06-18 21:56:06
阅读次数:
215
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:
其他好文 时间:
2014-06-18 17:32:02
阅读次数:
168
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ...
分类:
其他好文 时间:
2014-06-18 17:25:33
阅读次数:
155
1.对字符串进行hash大家可以看一下, SHA1 HashesGo by Example写道:The pattern for generating a hash is sha1.New(), sha1.Write(bytes), then sha1.Sum([]byte{}). 附上golang代...
分类:
其他好文 时间:
2014-06-18 16:07:48
阅读次数:
294
有重复数据主要有一下几种情况:1.存在两条完全相同的纪录 这是最简单的一种情况,用关键字distinct就可以去掉 example: select distinct * from table(表名) where (条件)2.存在部分字段相同的纪录(有主键id即唯一键) 如果是这种...
分类:
其他好文 时间:
2014-06-18 15:08:18
阅读次数:
173
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-06-18 13:29:31
阅读次数:
214
1.使用pull解析 1 package com.example.myxml; 2 3 import java.io.InputStream; 4 import java.util.ArrayList; 5 import java.util.List; 6 7 import org.xmlpul.....
分类:
移动开发 时间:
2014-06-18 13:28:17
阅读次数:
228
/* * This is an example build file that demonstrates how to use the build system for * require.js. * * THIS BUILD FILE WILL NOT WORK. It is referencin...
分类:
Web程序 时间:
2014-06-17 13:06:47
阅读次数:
369
1.安装配置tomcat:略2.访问一下,看tomcat有没安装配置成功如果成功的话开始配置solr服务器(企业应用搜索服务器):tarfvxzsolr-4.8.1.tgz拷贝solr.war到tomcat目录:cp-frsolr-4.8.1/example/webapps/solr.war/app01/tomcat-8.0.8/webapps/创建solr主目录并拷贝文件mkdir/ap..
分类:
其他好文 时间:
2014-06-16 15:22:06
阅读次数:
326