Follow up for problem "Populating Next Right Pointers in Each Node".
What if the given tree could be any binary tree? Would your previous solution still work?
Note:
You may only use constant extr...
分类:
其他好文 时间:
2014-08-20 22:47:33
阅读次数:
297
Sort a linked list inO(nlogn) time using constant space complexity.1st ( 7 tries)/** * Definition for singly-linked list. * struct ListNode { * in...
分类:
其他好文 时间:
2014-08-20 14:03:02
阅读次数:
198
crontab -e* * * * * /root/start.sh*/20 * * * * /usr/sbin/ntpdate 0.centos.pool.ntp.org >>/root/ntp.logvi /root/start.sh#!/bin/bash#判断进程是否存在,如果不存在就启动它P...
分类:
其他好文 时间:
2014-08-20 12:12:12
阅读次数:
199
httpd.conf的配置 426 # Server-pool management (MPM specific) 427 Include conf/extra/httpd-mpm.conf [root@AY140716161543837722Z /]# apachectl -l Compiled in modules: ? core.c ? prefork.c ? http_c...
分类:
Web程序 时间:
2014-08-19 16:57:55
阅读次数:
334
package com.lw.leet4;/** * @ClassName:Solution * @Description: * Sort List * Sort a linked list in O(n log n) time using constant spa...
分类:
其他好文 时间:
2014-08-18 20:26:22
阅读次数:
170
/** * extern NSString * const serverAddress; // constant pointer 常量指针。 就是指针是不变的 * extern const NSString * serverAddress;// pointer to constant 指向...
分类:
其他好文 时间:
2014-08-16 13:48:40
阅读次数:
237
mutalbe的中文意思是“可变的,易变的”,跟constant(既C++中的const)是反义词。 在C++中,mutable也是为了突破const的限制而设置的。被mutable修饰的变量,将永远处于可变的状态,即使在一个const函数中。...
分类:
编程语言 时间:
2014-08-14 14:23:19
阅读次数:
566
Problem Description:
Sort a linked list in O(n log n)
time using constant space complexity.
分析:对链表进行排序,思考排序算法时间复杂度为O(nlogn)的只有归并,快排和堆排序,应用到链表上的归并比较合适,这里利用快慢指针找到链表的中间节点,然后分别对两边递归归并排好序后将两边归并即可得到最终...
分类:
其他好文 时间:
2014-08-13 22:25:57
阅读次数:
234
1整体架构2中央日志服务器配置2.1配置时钟同步2.1.1方式一中央日志服务器和Tomcat节点均向同一个时钟源(例如:pool.ntp.org)进行对时即可。说明:本小节下面命令均以root用户执行,并且在中央日志服务器和Tomcat节点均要执行。首先,需要关闭ntpd服务:servicentpdstopchkcon..
分类:
其他好文 时间:
2014-08-13 19:27:18
阅读次数:
345