码迷,mamicode.com
首页 >  
搜索关键字:solution upgrade    ( 13024个结果
LeetCode Jump Game
class Solution {public: bool canJump(int A[], int n) { if (A == NULL || n sum(n, 0); int jump = A[n-1]; for (int i=n-...
分类:其他好文   时间:2014-07-17 00:01:54    阅读次数:292
[LeetCode OJ] Roman to Integer
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.下面是百度得到的关于罗马数的解释:我的代码: 1 class Solution { 2 ...
分类:其他好文   时间:2014-07-16 18:00:22    阅读次数:214
LeetCode——Combinations
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example, If n = 4 and k = 2, a solution is: [ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4], ]...
分类:其他好文   时间:2014-07-16 17:27:32    阅读次数:139
【leetcode】Reorder List (python)
问题的思路是这样: 循环取头部合并,其实也可以换个角度来看,就是将后面的链表结点,一次隔空插入到第一部分的链表中。 class Solution: # @param head, a ListNode # @return nothing def reorderList(self, head): if None == head or None == ...
分类:编程语言   时间:2014-07-16 17:23:30    阅读次数:207
【leetcode】Linked List Cycle (python)
题目分析见这里 class Solution: # @param head, a ListNode # @return a list node def detectCycle(self, head): if None == head or None == head.next: return None pfast = ...
分类:编程语言   时间:2014-07-16 17:18:53    阅读次数:248
LeetCode Count and Say
class Solution {public: string countAndSay(int n) { vector num; num2digit(1, num); vector tmp; for (int i = 1; i &digit...
分类:其他好文   时间:2014-07-16 17:02:13    阅读次数:144
如何用Jenkins触发另一个Jenkins---Global build solution
当今很多公司做的产品只是全球化工作的一部分,而如何处理本地jenkins自动触发异地jenkins的配置,却成为了一个问题。本文提出了2种简单的解决方案。...
分类:其他好文   时间:2014-07-16 12:47:05    阅读次数:190
LeetCode N-Queens
class Solution {private: int queen_num; vector > res;public: vector > solveNQueens(int n) { res.clear(); queen_num = n; ...
分类:其他好文   时间:2014-07-16 12:09:34    阅读次数:247
【leetcode】Linked List Cycle (python)
class Solution: # @param head, a ListNode # @return a boolean def hasCycle(self, head): if None == head or None == head.next: return False pfast = head ...
分类:编程语言   时间:2014-07-16 09:50:21    阅读次数:271
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!