- 博客(17)
- 资源 (35)
- 收藏
- 关注
原创 [leetcode] Valid Parentheses
class Solution { public: bool isValid(string s) { if (s.size()%2==1) {//奇数个符号 return false; } //使用栈 stack sc;
2014-05-20 10:58:56 509
原创 [leetcode] Word Search
class Solution { public: bool exist(vector > &board, string word) { if (word.size()==0) { return true;//空串返回true } int row=board.size(); int co
2014-05-20 00:22:57 572
原创 [leetcode] Word Ladder
#include #include //mac os下引用unordered_set,散列容器 #include #include using namespace std; class Solution { public: int ladderLength(string start, string end, unordered_set &dict) {
2014-05-12 01:26:17 846
原创 [leetcode] Reverse Words in a String
#include "iostream" using namespace std; class Solution { public: void reverseWords(string &s) { int len=(int)s.length()-1;//显示转换unsigned long to int string res=
2014-05-11 02:09:46 555
原创 [leetcode] First Missing Positive
#include "iostream" using namespace std; class Solution { public: int firstMissingPositive(int A[], int n) { if (A==NULL||n<1) {//数组为空 return 1; } int
2014-05-08 15:35:42 515
原创 [leetcode] Insertion Sort List
#include "iostream" using namespace std; /**Definition for singly-linked list.*/ struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution {
2014-05-07 15:11:00 563
原创 [leetcode] Remove Duplicates from Sorted List II
#include "iostream" using namespace std; /**Definition for singly-linked list.*/ struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution {
2014-05-07 10:53:15 609
原创 [leetcode] Sort List
/**Definition for singly-linked list.*/ #include using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public:
2014-05-06 14:29:58 518
原创 [leetcode] Remove Duplicates from Sorted List
#include "iostream" using namespace std; /**Definition for singly-linked list.*/ struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution {
2014-05-06 01:01:28 524
原创 [leetcode] Partition List
#include "iostream" using namespace std; /**Definition for singly-linked list.*/ struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { p
2014-05-06 00:12:54 483
原创 ThoughtWorks FizzBuzzWhizz
#include #include using namespace std; int main() { cout<<"pls input 3 numbers a,b,c (0<a,b,c<10 and a!=b!=c):"<<endl; int x1,x2,x3; cin>>x1>>x2>>x3; string str1,str2,str3; ost
2014-05-05 16:02:18 581
原创 [leetcode] Rotate List
/** Definition for singly-linked list. */ #include using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public:
2014-05-05 01:12:57 543
原创 [leetcode] Add Two Numbers
#include using namespace std; /** Definition for singly-linked list. */ struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public:
2014-05-04 21:48:44 640
原创 codeblocks “That file isn't assigned to any target.”
codeblocks “That file isn't assigned to any target.” 解决方法:
2014-05-04 09:50:56 5192 4
原创 [leetcode] Count and Say
Count and Say sh // // main.cpp // CPPTest // // Created by lyd on 14-5-3. // Copyright (c) 2014年 ___LYD___. All rights reserved. // #include using namespace std; class Solution { public:
2014-05-04 00:52:25 764
weka 连数据库使用的jar包
2013-04-13
Windows 2003(XP)下安装配置Apache2.2.17+PHP5.2.17+mysql5.5.11服务器
2011-04-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人