码迷,mamicode.com
首页 >  
搜索关键字:solution upgrade    ( 13024个结果
#Leet Code# Divide Two Integers
描述:不使用 * / % 完成除法操作。O(n)复杂度会超时,需要O(lg(n))复杂度。代码: 1 class Solution: 2 # @return an integer 3 def dividePositive(self, dividend, divisor): 4 ...
分类:其他好文   时间:2014-07-16 19:18:00    阅读次数:298
LeetCode--Reverse Words in a String
class Solution {public: void reverseWords(string &s) { int len = s.length(); if(len == 0) return; vector res; ...
分类:其他好文   时间:2014-07-16 18:50:12    阅读次数:161
LeetCode Construct Binary Tree from Preorder and Inorder Traversal
class Solution {public: TreeNode *buildTree(vector &preorder, vector &inorder) { int plen = preorder.size(); int ilen = inorder.size(...
分类:其他好文   时间:2014-07-16 18:41:43    阅读次数:182
LeetCode Construct Binary Tree from Inorder and Postorder Traversal
class Solution {public: TreeNode *buildTree(vector &inorder, vector &postorder) { int ilen = inorder.size(); int plen = postorder.siz...
分类:其他好文   时间:2014-07-16 18:23:21    阅读次数:155
SGU 146.The Runner
时间限制:0.25s空间限制:4M题意: 一个人在一个周长为L的圆上跑,每个时间段(Ti)的速度(Vi)不一样,问最后他离起点的圆弧距离,周长是个有四位小数的浮点数,其它全是整数。Solution : 在遇到浮点数的时候,能避免处理就尽量避免处理。 这里只要将浮点数乘上1000...
分类:其他好文   时间:2014-07-15 23:20:50    阅读次数:328
leetcode——Insertion Sort List 对链表进行插入排序(AC)
Sort a linked list using insertion sort. class Solution { public: ListNode *insertionSortList(ListNode *head) { if(head == NULL || head->next == NULL) return head; Lis...
分类:其他好文   时间:2014-07-15 12:22:53    阅读次数:244
No WebApplicationContext found: no ContextLoaderListener registered?报错解决
今天跑了下新搭的一个SSI框架。报如下错误: 严重: Exception sending context initialized event to listener instance of class com.j.chat.upgrade.web.core.SystemLaunchListener java.lang.IllegalStateException: No WebApplicat...
分类:移动开发   时间:2014-07-15 10:43:08    阅读次数:405
leetcode First Missing Positive hashset简单应用
1 public class Solution { 2 public int firstMissingPositive(int[] A) { 3 HashSet hash=new HashSet(); 4 int count=0; 5 int...
分类:其他好文   时间:2014-07-15 08:58:16    阅读次数:239
jump game
1。第一次觉得很简单,但是超时了 1 public class Solution { 2 public boolean canJump(int[] A) { 3 4 int len=A.length; 5 boolean b[]=new bo...
分类:其他好文   时间:2014-07-15 08:42:00    阅读次数:214
Zabbix version upgrade (1.8.3 to 1.8.12)
最近公司这边在做Zabbix服务器的升级,从OpenSuse11.2 升级到OpenSuse11.4,然后Zabbix就出现了兼容性问题(OpenSuse11.4 无法兼容zabbix1.8.3),而在OpenSuse的网站上也没有Zabbix的更新包,所以只能按照官网的升级思路去升级Zabbix了...
分类:其他好文   时间:2014-07-15 00:10:32    阅读次数:442
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!