这题我的第一想法是用头插法,但实际上并不好做,因为每次都需要遍历最后一个。更简单的做法是将其连成环,找到相应的位置重新设头结点和尾结点。这过 有很多细节需要注意,比如K有可能是大于链表长度的,如何重新设置K等都要注意。 ListNode *rotateList(ListNode *head, int ...
分类:
其他好文 时间:
2016-05-19 15:04:19
阅读次数:
121
一、MPM MPM(Multi-Processing Module (MPM) implements a hybrid multi-process multi-threaded server)是Apache2引入的一个概念,多路处理模块,就是将结构模块化。把核心任务处理作为一个可插拔的模块,即MPM ...
分类:
Web程序 时间:
2016-05-19 11:53:46
阅读次数:
255
一天一道LeetCode系列(一)题目
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度旋转图像,我们不难看出matrix[i...
分类:
其他好文 时间:
2016-05-18 19:07:37
阅读次数:
113
# Java API for XML Processing (JAXP)# Study Note of JAVA Tutorial# victor# 2016.05.17 Document Object Model APIs ...
分类:
编程语言 时间:
2016-05-18 17:24:17
阅读次数:
181
Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Not ...
分类:
其他好文 时间:
2016-05-18 00:25:09
阅读次数:
179
Rotate Array 本题目收获: 题目: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated ...
分类:
其他好文 时间:
2016-05-17 09:53:52
阅读次数:
296
还是不是很懂这个算法是要干什么……根据他给的实力我先写了这个函数: ListNode* rotateRight(ListNode* head, int k) { if(head == NULL) return head; if(head->next == NULL) return head; Lis ...
分类:
其他好文 时间:
2016-05-17 06:18:09
阅读次数:
93
CSS32D转换------转换:使用transform属性将HTML元素移动、旋转、缩放、倾斜1.移动translate(x轴,y轴)、translateX、translateY2.旋转rotate(45deg)//顺时针旋转45度3.缩放scale(1.2)//放大1.2倍scale(x轴,y轴)、scaleX、scaleY4.倾斜skew(45deg,-20deg)//沿x轴倾斜的角度..
分类:
Web程序 时间:
2016-05-16 11:14:13
阅读次数:
182
这题需要搞清楚矩阵元素的位置关系,尤其是副对角线元素,沿着副对角线元素 void rotateImage(vector<vector<int>> &matrix) { int n = matrix.size(); //沿着副对角线翻转 for (int i = 0; i < n;i++) for ( ...
分类:
其他好文 时间:
2016-05-15 21:32:30
阅读次数:
144
Matrix-Rotate Image: 或者 You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up:Could you do thi ...
分类:
其他好文 时间:
2016-05-13 12:44:51
阅读次数:
173