码迷,mamicode.com
首页 > 其他好文
Problem 35:Circular primes
Circular primesp = (lambda n,s=set():{'2'}|{str(i) for i in range(3,n,2) if ([j for j in range(i*3,n,i*2) if s.add(j)] or i not in s)})(int(1e6))print...
分类:其他好文   时间:2015-01-09 06:58:19    阅读次数:172
[LeetCode#99]Recover Binary Search Tree
The problem:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(...
分类:其他好文   时间:2015-01-09 06:54:36    阅读次数:132
2015年1月9日XX大学XX学院考试题
复习 一、选择题 1.计算机算法指的是???????。 A.计算方法?????B.?排序方法????????C.?解决问题的步骤序列??????D.?调度方法 2.?下面关于算法说法正确的是(????) A.算法最...
分类:其他好文   时间:2015-01-09 01:55:51    阅读次数:329
[LeetCode]133 Clone Graph
https://oj.leetcode.com/problems/clone-graph/http://blog.csdn.net/linhuanmars/article/details/22715747/** *Definitionforundirectedgraph. *classUndirectedGraphNode{ *intlabel; *List<UndirectedGraphNode>neighbors; *UndirectedGraphNode(intx){label=x;neig..
分类:其他好文   时间:2015-01-09 01:53:41    阅读次数:170
[LeetCode]134 Gas Station
https://oj.leetcode.com/problems/gas-station/http://blog.csdn.net/linhuanmars/article/details/22706553publicclassSolution{ publicintcanCompleteCircuit(int[]gas,int[]cost){ intlen=gas.length; //Costifrunallstations intallcost=0; //Startpoint intstart=0; ..
分类:其他好文   时间:2015-01-09 01:54:44    阅读次数:161
[LeetCode]140 Word Break II
https://oj.leetcode.com/problems/word-break-ii/http://blog.csdn.net/linhuanmars/article/details/22452163publicclassSolution{ publicList<String>wordBreak(Strings,Set<String>dict) { //SolutionA: //returnwordBreak_NP(s,dict); //SolutionB: return..
分类:其他好文   时间:2015-01-09 01:52:58    阅读次数:160
django 学习个人总结 之form表单提交
fromdjango.shortcutsimportrender_to_response fromdjangoimportforms fromdjango.httpimportHttpResponse classUserForm(forms.Form): name=forms.CharField() defregister(req): ifreq.method==‘POST‘: form_object=UserForm(req.POST) ifform_object.is_valid(): printfo..
分类:其他好文   时间:2015-01-09 01:52:51    阅读次数:156
Exchange 2013多租户托管PART 5:配置通讯簿策略
又有一段时间没有写东西了,今天给大家带来的是基于通讯簿策略来为不同租户分配相对应的通讯簿,包括脱机地址列表等。首先,我们需要安装通讯簿策略路由传输助理,可以通过ExchangeManagementShell来完成:Install-TransportAgent-Name"ABPRoutingAgent"-TransportAgentFactory..
分类:其他好文   时间:2015-01-09 01:53:30    阅读次数:200
[LeetCode]141 Linked List Cycle
https://oj.leetcode.com/problems/linked-list-cycle/http://blog.csdn.net/linhuanmars/article/details/21200601/** *Definitionforsingly-linkedlist. *classListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ publicclassSolution{ publi..
分类:其他好文   时间:2015-01-09 01:52:33    阅读次数:155
[LeetCode]142 Linked List Cycle II
https://oj.leetcode.com/problems/linked-list-cycle-ii/http://blog.csdn.net/linhuanmars/article/details/21260943/** *Definitionforsingly-linkedlist. *classListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ publicclassSolution{ pu..
分类:其他好文   时间:2015-01-09 01:51:33    阅读次数:173
[LeetCode]143 Reorder List
https://oj.leetcode.com/problems/reorder-list/http://blog.csdn.net/linhuanmars/article/details/21503215/** *Definitionforsingly-linkedlist. *classListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ publicclassSolution{ publicvoid..
分类:其他好文   时间:2015-01-09 01:51:44    阅读次数:175
[LeetCode]144 Binary Tree Preorder Traversal
https://oj.leetcode.com/problems/binary-tree-preorder-traversal/http://blog.csdn.net/linhuanmars/article/details/21428647/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassSolu..
分类:其他好文   时间:2015-01-09 01:52:30    阅读次数:274
[LeetCode]147 Insertion Sort List
https://oj.leetcode.com/problems/insertion-sort-list/http://blog.csdn.net/linhuanmars/article/details/21144553/** *Definitionforsingly-linkedlist. *publicclassListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ publicclassSolutio..
分类:其他好文   时间:2015-01-09 01:50:04    阅读次数:172
centos 安装yum网络源
安装虚拟机啊,使用公司给定的centos6.0的iso镜像,该镜像经过裁剪,而且工作中要使用mercurial(hg)版本控制工具,所以需要yuminstallmercurial。刚开始安装完该系统,yuminstallmercurial提示不能解析域名,应该是网络连接不上,选择桥接方式,然后在/etc/sysconfig/network..
分类:其他好文   时间:2015-01-09 01:51:11    阅读次数:257
一定要打造极致的产品吗?
看了文章的标题,是不是好像一个技术人员在写一篇反对产品经理的檄文?不是,因为我也是无比龟毛的***座啊,我这人不但对工作、对生活都很***座,做技术做产品也一样,经常把各种极致挂在嘴边。但是近几个月针对一款新产品我们这支内部创业团队深入到市尝产品、研发的交叉工作..
分类:其他好文   时间:2015-01-09 01:47:36    阅读次数:142
icinga实战安装部署及短信报警脚本
icinga安装配置一、icinga介绍:ICINGA项目是由MichaelLuebben、HendrikBacker和JoergLinge等人发起的,他们都是现有的Nagios项目社区委员会的成员,他们承诺,新的开源项目将完全兼容以前的Nagios应用程序及扩展功能。在新项目的网站上,他们是如此定义ICINGA的,这将是一个介..
分类:其他好文   时间:2015-01-09 01:48:32    阅读次数:411
解决“你己使用临时配置文件登录”的问题
解决"你己使用临时配置文件登录"的问题 在使用Windows操作系统的时候,有时候由于系统配置或者某方面的原因,会造成配置文件丢失或损坏,而系统使用临时配置文件登录的问题,主要提示如图1所示。 图1使用临时配置文件登录 在出现此类问题时,在"系统属性→高级→(用户配..
分类:其他好文   时间:2015-01-09 01:48:54    阅读次数:187
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!