会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
frankM
天下武功,唯快不破。
博客园
|
首页
|
新随笔
|
新文章
|
联系
|
订阅
|
管理
上一页
1
2
3
4
5
6
7
8
···
18
下一页
2015年2月2日
LeetCode 3Sum Closest
摘要: 链接:https://oj.leetcode.com/problems/3sum-closest/跟3-sum的思路是一样的。根据sum与target的大小关系,分别移动数组两端的“指针”,同时记录sum与target最小的距离class Solution {public: int three...
阅读全文
posted @ 2015-02-02 22:33 frankM
阅读(102)
评论(0)
推荐(0)
编辑
2015年2月1日
一定要做的事(备忘)
摘要: 一:玩树莓派(Raspberry Pi):二:用firefox OS或者ubuntu的手机至于ubuntu的电脑,已经用上一段时间了。准备彻底放弃windows,拥抱开源三 在GitHub上拥有至少一个开源项目
阅读全文
posted @ 2015-02-01 12:49 frankM
阅读(106)
评论(0)
推荐(0)
编辑
2015年1月31日
LeetCode Integer to Roman
摘要: 链接: https://oj.leetcode.com/problems/integer-to-roman/题目上已经说最大出现的整型值为3999,这样就很简单了。class Solution{ public: string intToRoman(int num) { string ans;...
阅读全文
posted @ 2015-01-31 20:42 frankM
阅读(106)
评论(0)
推荐(0)
编辑
2015年1月29日
Container With Most Water
摘要: 链接: https://oj.leetcode.com/problems/container-with-most-water/尺取法,从两端向中间缩进class Solution{ public: int maxArea(vector &height) //尺取法 { int L=0; ...
阅读全文
posted @ 2015-01-29 15:02 frankM
阅读(126)
评论(0)
推荐(0)
编辑
2015年1月28日
LeetCode ZigZag Conversion
摘要: 链接: https://oj.leetcode.com/problems/zigzag-conversion/题意为:把字符串按如下规则排列AGMBFHLNCEIK:DJ:输出按行顺序:AGMBFHLNCEIKDJ剩下的就是通过字符的坐标计算在字符串中的位置了class Solution{ publ...
阅读全文
posted @ 2015-01-28 01:34 frankM
阅读(134)
评论(0)
推荐(0)
编辑
2015年1月26日
LeetCode 5 最长回文子串 Manacher线性算法
摘要: 题目链接:https://oj.leetcode.com/problems/longest-palindromic-substring/回文串即正向反向序列都一样的连续序列 如abba,abcba...为了统一回文串的偶数情况和奇数情况,可以向串中插入不相关的字符,例如abba->#a#b#b#a#...
阅读全文
posted @ 2015-01-26 12:19 frankM
阅读(214)
评论(0)
推荐(0)
编辑
2015年1月22日
LeetCode Longest Substring Without Repeating Characters
摘要: 链接: https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/字符串中最长连续不重复子序列,用JAVA中的哈希表比较方便public class Solution { public int...
阅读全文
posted @ 2015-01-22 23:50 frankM
阅读(122)
评论(0)
推荐(0)
编辑
2015年1月20日
Add Two Numbers
摘要: 链接:https://oj.leetcode.com/problems/add-two-numbers/链表的大数加法/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode ...
阅读全文
posted @ 2015-01-20 20:08 frankM
阅读(119)
评论(0)
推荐(0)
编辑
vim 常用插件的安装
摘要: 安装如下几个插件taglist 以分割窗口显示代码结构预览 下载地址:http://www.vim.org/scripts/script.php?script_id=273stl STL语法高亮 下载地址:http://www.vim.org/scripts/script.php?script_id...
阅读全文
posted @ 2015-01-20 14:48 frankM
阅读(665)
评论(0)
推荐(0)
编辑
2015年1月18日
LeetCode Swap Nodes in Pairs
摘要: 链接:https://oj.leetcode.com/problems/swap-nodes-in-pairs/交换链表相邻的节点的位置/** * Definition for singly-linked list. * struct ListNode { * int val; * ...
阅读全文
posted @ 2015-01-18 14:24 frankM
阅读(119)
评论(0)
推荐(0)
编辑
上一页
1
2
3
4
5
6
7
8
···
18
下一页
公告