会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
卖程序的小歪
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
26
27
28
29
30
31
32
33
34
···
46
下一页
2014年7月27日
LeetCode Anagrams
摘要: struct mystat { int idx; int cnt[26]; mystat(int id = 0) {idx = id;}};bool cmp(const mystat &a, const mystat &b) { for (int i=0; i b.cnt[i...
阅读全文
posted @ 2014-07-27 12:42 卖程序的小歪
阅读(114)
评论(0)
推荐(0)
2014年7月26日
LeetCode Wildcard Matching
摘要: class Solution {public: bool isMatch(const char *s, const char *p) { if (s == NULL || p == NULL) return false; int slen = 0; i...
阅读全文
posted @ 2014-07-26 23:43 卖程序的小歪
阅读(226)
评论(0)
推荐(0)
2014年7月24日
MySQL 重装
摘要: 最近一台服务器上的MySQL崩了,innodb单单靠.frm和.ibd好像恢复不过来,只能重装。但是重装也没让人省心,最好把/var/lib/mysql和/etc/mysql都删了,如果提示mysql-server-core要autoremove 的就在执行一次apt-get autoremove才...
阅读全文
posted @ 2014-07-24 10:41 卖程序的小歪
阅读(159)
评论(0)
推荐(0)
2014年7月23日
MySQL root 密码修改
摘要: 小伙伴要在以前的服务器上装个代码版本控制的软件,要用到数据库,可是想来找去root密码还是忘了,其他已经安装的服务都是用的专用账户配置文件里要找不到root用户的密码。用以下方法将密码强制修改掉:1. 将mysql服务以安全模式方式运行,需要系统root权限sudo suservice mysql ...
阅读全文
posted @ 2014-07-23 14:30 卖程序的小歪
阅读(209)
评论(0)
推荐(0)
2014年7月22日
LeetCode Clone Graph
摘要: class Solution {public: UndirectedGraphNode *cloneGraph(UndirectedGraphNode *node) { UndirectedGraphNode *clone = dfs(node); dfs_clea...
阅读全文
posted @ 2014-07-22 20:29 卖程序的小歪
阅读(184)
评论(0)
推荐(0)
LeetCode Best Time to Buy and Sell Stock III
摘要: class Solution {public: int maxProfit(vector &prices) { int len = prices.size(); if (len i2r(len, 0); vector i2l(len, 0); ...
阅读全文
posted @ 2014-07-22 16:09 卖程序的小歪
阅读(172)
评论(0)
推荐(0)
LeetCode Evaluate Reverse Polish Notation
摘要: Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
阅读全文
posted @ 2014-07-22 10:56 卖程序的小歪
阅读(142)
评论(0)
推荐(0)
2014年7月21日
LeetCode First Missing Positive
摘要: class Solution {public: int firstMissingPositive(int A[], int n) { if (A == NULL || n bits(len, false); for (int i=0; i n) continue;...
阅读全文
posted @ 2014-07-21 21:09 卖程序的小歪
阅读(167)
评论(0)
推荐(0)
2014年7月20日
LeetCode Roman to Integer
摘要: class Solution {private: const static char* pattern[]; const static char* roman[]; unordered_map a2i;public: int romanToInt(string s) { ...
阅读全文
posted @ 2014-07-20 20:32 卖程序的小歪
阅读(127)
评论(0)
推荐(0)
LeetCode Trapping Rain Water
摘要: class Solution {public: int trap(int A[], int n) { if (n peaks; vector peaks_tmp; int last_idx = 0; bool increasing = ...
阅读全文
posted @ 2014-07-20 17:27 卖程序的小歪
阅读(236)
评论(0)
推荐(0)
上一页
1
···
26
27
28
29
30
31
32
33
34
···
46
下一页
公告