会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
canexjtuzju
记录
Powered by
博客园
博客园
|
首页
|
新随笔
|
联系
|
订阅
|
管理
2014年9月4日
LeetCode--Plus One
摘要: 考查,最高位有进位 1 class Solution { 2 public: 3 vector plusOne(vector &digits) { 4 // IMPORTANT: Please reset any member data you declared, as 5 ...
阅读全文
posted @ 2014-09-04 22:33 canexjtuzju
阅读(126)
评论(0)
推荐(0)
编辑
LeetCode--Combination Sum
摘要: 一开始的思路是:中序遍历+判断遍历后的数组,时间空间都不是最优果然超时了 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * ...
阅读全文
posted @ 2014-09-04 22:10 canexjtuzju
阅读(165)
评论(0)
推荐(0)
编辑
LeetCode--Balanced Binary Tree
摘要: 递归 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode...
阅读全文
posted @ 2014-09-04 21:16 canexjtuzju
阅读(135)
评论(0)
推荐(0)
编辑
LeetCode--N-Queens II
摘要: dfs 1 class Solution { 2 public: 3 int res; 4 int totalNQueens(int n) { 5 res = 0; 6 vector arr(n); 7 dfs(arr,0,n); 8 ...
阅读全文
posted @ 2014-09-04 21:07 canexjtuzju
阅读(125)
评论(0)
推荐(0)
编辑
LeetCode--Merge Two Sorted Lists
摘要: 重新写了下,代码看着清爽多了 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x...
阅读全文
posted @ 2014-09-04 20:20 canexjtuzju
阅读(149)
评论(0)
推荐(0)
编辑
Android源码编译命令详解(二)
摘要: 通过上篇文章,我们分析了编译android时source build/envsetup.sh和lunch命令,在执行完上述两个命令后, 我们就可以进行编译android了。1. make执行make命令的结果就是去执行当前目录下的Makefile文件,我们来看下它的内容:[html] 1 ### D...
阅读全文
posted @ 2014-09-04 15:05 canexjtuzju
阅读(337)
评论(0)
推荐(0)
编辑
Android源码编译命令详解(一)
摘要: Android的优势就在于其开源,手机和平板生产商可以根据自己的硬件进行个性定制自己的手机产品,如小米,LePhone,M9等,因此,在我们在对Android的源码进行定制的时候,很有必要了解下,Android的编译过程。如果你从来没有做过Android代码的编译,那么最官方的编译过程就是查看And...
阅读全文
posted @ 2014-09-04 15:04 canexjtuzju
阅读(493)
评论(0)
推荐(0)
编辑
LeetCode--Restore IP Addresses
摘要: dfs即可注意边界情况:(1)s长度不在4 和 12之间(2)"010"这种形式是错误的 1 class Solution { 2 public: 3 vector restoreIpAddresses(string s) { 4 vector res; 5 ...
阅读全文
posted @ 2014-09-04 10:13 canexjtuzju
阅读(141)
评论(0)
推荐(0)
编辑