Given inorder and postorder traversal of a tree, construct the binary tree.Note: You may assume that duplicates do not exist in the tree.class Solutio...
分类:
其他好文 时间:
2014-08-04 23:57:18
阅读次数:
476
题目:Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array A = [1,1,1,2,2,3],Your function shou....
分类:
编程语言 时间:
2014-08-04 13:24:27
阅读次数:
256
问题:将有序的数组中重复的数字去掉分析:由于有序所以只用和前一个比较就行class Solution {public: int removeDuplicates(int A[], int n) { int i,j; if(n==0 || n==1) return n...
分类:
其他好文 时间:
2014-08-03 17:42:35
阅读次数:
204
Corner cases!class Solution {public: ListNode *deleteDuplicates(ListNode *head) { if (!head) return head; if (!head->next) return hea...
分类:
其他好文 时间:
2014-08-03 07:51:34
阅读次数:
237
Step1.安装sendmail来发邮件#yum-yinstallsendmail#/etc/init.d/sendmailstart#chkconfigsendmailonStep2.安装邮件客户端#yum-yinstallmutt2.1添加发件人信息,如下#vim/etc/Muttrcsetcharset="utf-8"#设置发邮件编码setenvelope_from=yessetrfc2047_parameters=yes#解决附件乱..
分类:
其他好文 时间:
2014-08-02 23:35:55
阅读次数:
2598
SCOM默认支持邮件告警,即时消息告警,短信告警,那么如果要实现声音告警,应该如何实现呢?大家可以好好思考一下,需求就是SCOM产生警报,同时触发声音告警+短信告警+邮件报警。当时第一个想到的是LiveMaps,LiveMaps是一个单独的收费产品,通过LiveMaps可以很好地与SCOM进行..
分类:
其他好文 时间:
2014-08-02 23:34:55
阅读次数:
823
问题:将有序链表中的重复元素删除分析:由于有序,所以p结点是否重复只需要和它的前一节点比较是否相等就可以了,我们可以定义一个helper新头结点链表 将p结点与新链表的尾结点比较,若不相等则加入新链表中。class Solution{public: ListNode *deleteDup...
分类:
其他好文 时间:
2014-08-02 17:47:33
阅读次数:
210
问题描述:Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->...
分类:
其他好文 时间:
2014-08-02 01:33:12
阅读次数:
249
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
/**
* Definition for binary tree
* struct TreeNode {...
分类:
其他好文 时间:
2014-08-01 19:53:32
阅读次数:
222
这个方向与技术方案的实现,或产品的思考有很大关系的。
如,现在的某厂的【燃气报警器】,看上去不错吧。自动采集空气一氧化碳等危险气体的数据,
过界限了,就响,或关闭燃气开关。从功能上看,是不错了。但这里没有一个数据值。
没有其他不够危险的空气数据。这样就没有一个影响人的亚健康的分析数据。
所以说,从产品上说,只是做了第一步,没有第二步,或者硬件功能上也实现不了。第二步。
再说一点,...
分类:
其他好文 时间:
2014-08-01 13:44:12
阅读次数:
192