码迷,mamicode.com
首页 >  
搜索关键字:solution upgrade    ( 13024个结果
LeetCode "Jump Game"
A simulation problem. We simple walk through all reachable items until we cannot proceed.class Solution {public: bool canJump(int A[], int n) { ...
分类:其他好文   时间:2014-08-01 13:16:01    阅读次数:180
Integer to Roman
问题:将数字转化为罗马数字分析:将所有的数字打表出来class Solution {public: string intToRoman(int num) { char c[10][10][10]={{"0","I","II","III","IV","V","VI","VII","...
分类:其他好文   时间:2014-08-01 10:32:21    阅读次数:215
LeetCode "Pow(x,n)"
Next time you see a numeric problem has a too straightforward solution, think about optimized one.Like this one: recursion\iteration is tooo slow. SoD...
分类:其他好文   时间:2014-08-01 06:57:01    阅读次数:279
Postgres XL FAQ
Q. What does XL stand for? XL is short for eXtensible Lattice. It also connotes an extra large version of PostgreSQL, in this case across multiple systems. Q. Is this a “NoSQL” solution? No, Post...
分类:其他好文   时间:2014-08-01 00:17:51    阅读次数:358
Leetcode: N-Queens C++
1 class Solution { 2 public: 3 vector > solveNQueens(int n) { 4 vector> res; 5 vector> pre_res; 6 for(int i = 0; i tmp;11 ...
分类:编程语言   时间:2014-07-31 23:23:50    阅读次数:319
中缀表达式转换成后缀表达式
/* solution of convertion of infix to postfix */#include #include #include struct StackRecord{ char Operator[32]; int TopIndex; int Capacity;...
分类:其他好文   时间:2014-07-31 19:44:42    阅读次数:200
LeetCode--Single Number II
思路:统计每位出现的次数,mod3;对于k同样适用 1 class Solution { 2 public: 3 int singleNumber(int A[], int n) { 4 int a[32] = {0}; 5 int i = 0; 6 ...
分类:其他好文   时间:2014-07-31 13:14:46    阅读次数:140
LeetCode : valid parentheses
解法:用栈,注意栈的用法和switch的用法 1 class Solution { 2 public: 3 bool isValid(string s) { 4 5 stack istack; 6 string::iterator p=s.b...
分类:其他好文   时间:2014-07-31 12:12:46    阅读次数:229
选择的文件是解决方案文件,但是用此应用程序的较新版本创建的,无法打开
解决办法:记事本或写字板打开解决方案文件,把版本更改为你现在的版本就可以了,如下,我将Format Version 12.00改为11.00,就能运行该方案了将其改成你现在用的vs版本就可以打开了——vs2010改为:Microsoft Visual Studio Solution File, Fo...
分类:其他好文   时间:2014-07-31 09:34:15    阅读次数:271
LeetCode "Reverse Linked List II"
Just corner case..class Solution {public: ListNode *reverseBetween(ListNode *head, int m, int n) { if(m == n) return head; ListNode *...
分类:其他好文   时间:2014-07-31 09:34:05    阅读次数:245
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!