Description:You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?Code: 1...
分类:
其他好文 时间:
2015-06-14 10:53:39
阅读次数:
99
一、GuavaGoogle 的基于java1.6的类库集合的扩展项目,包括collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O等等. 这些...
分类:
移动开发 时间:
2015-06-12 18:45:04
阅读次数:
138
Rotate ListGiven a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3-...
分类:
其他好文 时间:
2015-06-12 09:46:35
阅读次数:
120
解题思路:
先将5以前的数据翻转得到的数组是[4,3,2,1,5,6,7]
再将5及以后的数据翻转得到的数组是[4,3,2,1,7,6,5]
再将整个数组翻转即得到[5,6,7,1,2,3,4]. (即为所求)...
分类:
编程语言 时间:
2015-06-11 19:37:12
阅读次数:
127
vi /etc/3proxy.cfg#nserver 8.8.8.8daemonservicelog /var/log/3proxy.log Dlogformat "- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"rotate 7#auth nbname...
分类:
其他好文 时间:
2015-06-11 18:54:53
阅读次数:
1164
在一个典型的事务处理场景中,有以下几个参与者:Resource Manager(RM)ResourceManager简称RM,它负责存储并管理系统数据资源的状态,比如数据库服务器,JMS消息服务器等都是相应的Resource Manager。Transaction Processing Monito...
分类:
编程语言 时间:
2015-06-11 00:13:28
阅读次数:
223
这里的k可能是比链表长度要大的数字,因此实际旋转的位置就是k%len(list)。如果这个计算结果等于零或者等于len(list),列表是不用旋转的。接下来如果是事例给出的正常情况,那么有三步就能完成旋转。(1)第一个辅助指针从头开始后移k个位置。(2)这时第二个辅助指针指向头指针,然后两个指针同时...
分类:
其他好文 时间:
2015-06-10 22:21:49
阅读次数:
241
AVL树:带有平衡条件的二叉查找树,即一棵AVL树是其每个节点的左子树和右子树的高度最多相差1的二叉查找树。一般通过Single Rotate和Double Rotate来保持AVL树的平衡。AVL树的实现如下:1) Single Rotate2)Double Rotate1) Single Rot...
分类:
其他好文 时间:
2015-06-09 21:33:58
阅读次数:
136
日志最佳实战1. logback2. 开发debug,生产info , 异常中用error3. 使用self4j的占位符方式输入日志。多个参数输出,参数项使用数组的形式。举例 : logger.debug("Processing trade with id: {} and symbol : {} "...
分类:
其他好文 时间:
2015-06-09 19:48:17
阅读次数:
159
You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Follow up:
Could you do this in-place?
题目解读:
将一个矩阵顺时针旋转90度。
方法一:
如下图所示,先转置,之后和变换的单位矩阵相乘...
分类:
其他好文 时间:
2015-06-09 17:23:38
阅读次数:
129