Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example,Given n = 3,You should return the followin...
分类:
其他好文 时间:
2014-11-17 06:53:48
阅读次数:
152
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix:[ [ 1,...
分类:
其他好文 时间:
2014-11-17 06:54:06
阅读次数:
190
Java的变参函数实现实际上参数是一个数组,其简单用法如下public class variableParamTest { private static void variableParam(Object... args) { for (Object v : args) { ...
分类:
编程语言 时间:
2014-11-17 06:51:48
阅读次数:
166
The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence ...
分类:
其他好文 时间:
2014-11-17 06:53:34
阅读次数:
214
方法一、原因在于从vista开始,微软在TCP/IP协议栈里新加了一个叫做“Window Auto-Tuning”的功能。这个功能本身的目的是为了让操作系统根据网络的实时性能,(比如响应时间)来动态调整网络上传输的数据窗口的大小,从而达到实时优化网络性能的目的。通过把autotuninglevel设...
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2014-11-17 06:53:34
阅读次数:
138
最近接触PAAS相关的知识,在研发过程中开始使用Docker搭建了自己完整的开发环境,感觉生活在PAAS时代的程序员真是幸福,本文会简要介绍下Docker是什么,如何利用Docker来搭建自己的开发环境(本文主要是面向Mac OS X),以及期间所遇到的一些坑和解决方案。(本文会要求你对PAAS、L...
分类:
其他好文 时间:
2014-11-17 06:53:13
阅读次数:
273
Given two words (startandend), and a dictionary, find all shortest transformation sequence(s) fromstarttoend, such that:Only one letter can be changed...
分类:
编程语言 时间:
2014-11-17 06:52:23
阅读次数:
236
原文地址:http://www.cnblogs.com/scau20110726/archive/2012/11/18/2776124.html粗略讲讲SPFA算法的原理,SPFA算法是1994年西安交通大学段凡丁提出是一种求单源最短路的算法算法中需要用到的主要变量int n; //表示n个点,从1...
分类:
编程语言 时间:
2014-11-17 06:52:02
阅读次数:
236
Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->...
分类:
其他好文 时间:
2014-11-17 06:51:30
阅读次数:
181
这道题数据范围小,方法比较多。我用floyd和spfa分别写了一下,spfa明显有时间优势。一个小技巧在于:把城市名称对应到数字序号,处理是用数字。方法一:spfa#include#include#include#include#include#include#include#include#inc...
分类:
其他好文 时间:
2014-11-17 06:50:13
阅读次数:
234
win2003系统下apache环境,mpm_winnt.c模式,优化参数:ThreadsPerChild说明:每个子进程建立的线程数,默认值:64,最大值:1920。网上查询资料建议设置在100-500之间。如服务器性能高,可设置更大值。MaxRequestsPerChild说明:每个子进程在其生...
分类:
Web程序 时间:
2014-11-17 06:50:02
阅读次数:
182
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any po...
分类:
其他好文 时间:
2014-11-17 06:51:30
阅读次数:
164
前言Docker旨在提供一种应用程序的自动化部署解决方案,在 Linux 系统上迅速创建一个容器(轻量级虚拟机)并部署和运行应用程序,并通过配置文件可以轻松实现应用程序的自动化安装、部署和升级,非常方便。因为使用了容器,所以可以很方便的把生产环境和开发环境分开,互不影响,这是 docker 最普遍的...
分类:
编程语言 时间:
2014-11-17 06:51:59
阅读次数:
356
Servlet 3.0 新特性概述Servlet 3.0 作为 Java EE 6 规范体系中一员,随着 Java EE 6 规范一起发布。该版本在前一版本(Servlet 2.5)的基础上提供了若干新特性用于简化 Web 应用的开发和部署。其中有几项特性的引入让开发者感到非常兴奋,同时也获得了 J...
分类:
其他好文 时间:
2014-11-17 06:51:37
阅读次数:
241
2012年8月31日,我在父亲的陪伴下,第一次登上的火车,千里迢迢从老家来到了现代化大都市--西安,目睹着这里的繁华,与从小生活的环境截然的天壤之别,蓦然间问自己,你确定这是想来的地方吗? 依稀记得曾经的年少轻狂。高三的时候,有一位女孩在纸条上写,咱俩一块考西安交大吧,那里的环境好,人也特别好...
分类:
编程语言 时间:
2014-11-17 06:48:58
阅读次数:
140
1.Abstract 临近12月了(今天11月16日),过不了多久冬天就要来了;逢上周末这么好的天气,决定出去兜一圈,感受一下秋的味道,顺便拍一些秋天的照片。 2.Contents 这几天看的书还是挺多的,在图书馆无意翻到一本《院士是怎么看书的》,随手翻看了一下,然后被深深打动了。“世间上有这么多的...
分类:
其他好文 时间:
2014-11-17 06:51:16
阅读次数:
210