码迷,mamicode.com
首页 >  
搜索关键字:solution upgrade    ( 13024个结果)
leetcode - Subsets
Given a set of distinct integers, S, return all possible subsets. Note: Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets. For exa...
分类:其他好文   时间:2014-10-12 18:17:08    阅读次数:242
第22题 Rotate List
Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. Solution: /** * Definition for ...
分类:其他好文   时间:2014-10-12 13:33:18    阅读次数:161
Leetcode Maximum Subarray
code:class Solution {public: int maxSubArray(int A[], int n) { int f=0, result=INT_MIN; for(int i=0; i<n; i++){ f=max(f+A[...
分类:其他好文   时间:2014-10-12 11:28:07    阅读次数:143
ubutun升级命令
sudo apt-get update --更新软件源sudo apt-get upgrade -更新已经安装的软件以非root用户更新系统sudo: sudo是linux系统管理指令,是允许系统管理员让普通用户执行一些或者全部的root命令的一个工具,如halt,reboot,su等等。这样不.....
分类:其他好文   时间:2014-10-12 10:25:07    阅读次数:200
Number of 1 bits
Brute force solution:Iterate 32 times, each time determining if the ith bit is a ’1′ or not. This is probably the easiest solution, and the interviewe...
分类:其他好文   时间:2014-10-12 06:43:57    阅读次数:219
[leetcode]Maximum Product Subarray @ Python
原题地址:https://oj.leetcode.com/problems/maximum-product-subarray/解题思路:主要需要考虑负负得正这种情况,比如之前的最小值是一个负数,再乘以一个负数就有可能成为一个很大的正数。代码:class Solution: # @param A...
分类:编程语言   时间:2014-10-11 20:28:16    阅读次数:238
leetcode - Maximal Rectangle
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area. class Solution { public: int largestRectangleArea(int* height, int length) { ...
分类:其他好文   时间:2014-10-11 17:37:26    阅读次数:156
用py2exe打包pyqt4出现的问题(转)
使用pyqt完成窗体界面很方便,但是打包成exe之后会有问题,在网上找到解决办法如下:Another Solution to the same problem:1 from distutils.core import setup2 import py2exe3 setup(windows=[{"sc...
分类:其他好文   时间:2014-10-11 15:50:45    阅读次数:159
LeetCode "Maximum Product Subarray"
Intuitively there must a O(n) solution.First I tried a bottom-up DP solution but it had a TLE:class Solution {public: int maxProduct(int A[], int n...
分类:其他好文   时间:2014-10-11 08:50:25    阅读次数:141
Printing a Binary Tree in Level Orders
BFS:Is it possible that a solution exists using only one single queue? Yes, you bet. The single queue solution requires two extra counting variables w...
分类:其他好文   时间:2014-10-11 03:37:04    阅读次数:190
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!