Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.题解:最开始用了最naive的方法,每次在k个链表头中找出最小的元素,插入到新链表中。结果果断TLE了。分析...
分类:
其他好文 时间:
2014-07-23 16:56:31
阅读次数:
227
原始题目例如以下,意为寻找数组和最大的子串,返回这个最大和就可以。Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, ...
分类:
其他好文 时间:
2014-07-23 15:45:59
阅读次数:
246
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:
其他好文 时间:
2014-07-23 15:06:06
阅读次数:
320
在项目中用到了一对多的实体类关系映射,之前接触的都是基于配置文件的映射实现,但是公司的大部分都是基于注解的,因此自己参考之前的代码捣鼓了基于注解的一对多的映射关系实现。
背景:
一的一端:QingAoCenterInfo:青奥场所信息,
多的一端:QingAoPlaceInfo:青奥场馆信息,
其中一个青奥场所下可以包含多个青奥场馆
one端:QingAoCenterIn...
分类:
系统相关 时间:
2014-07-23 13:10:46
阅读次数:
246
准备用AngularJS + require.js 作为新项目的底层框架,以下目录结果只是一个初步设想:/default 放页面,不过对于one page 项目,可能里面需要建一个partials文件夹;/develop 放测试及web server相关的东西,这个是不需要部署到正式环境的,所以.....
分类:
Web程序 时间:
2014-07-23 11:55:56
阅读次数:
284
In one embodiment, a computing device (e.g., border router or network management server) transmits a discovery message into a computer network, such a...
分类:
其他好文 时间:
2014-07-23 11:40:46
阅读次数:
445
In one embodiment, a local node in a communication network determines a set of its neighbor nodes, and determines a respective occurrence frequency at...
分类:
移动开发 时间:
2014-07-23 11:37:16
阅读次数:
373
DescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each ...
分类:
其他好文 时间:
2014-07-23 11:31:26
阅读次数:
269
单一职责原则(Single Responsibility Principle),简称SRP。 定义: There should never be more than one reason for a class to change. 应该有且仅有一个原因引起类的变更。 ? 有时候,开发人员设计接口的时...
分类:
其他好文 时间:
2014-07-23 00:34:27
阅读次数:
183
题目
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it wit...
分类:
其他好文 时间:
2014-07-23 00:13:17
阅读次数:
331