会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
julie_yang
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
5
6
7
8
9
10
11
下一页
2015年7月26日
进程与线程
摘要: 1、什么是进程与线程 进程是一个拥有资源的独立单位,是进程是程序的一次执行; 线程是进程中的一个实体,是调度的基本单位。2、为什么要有进程和线程 操作系统引入进程的目的是,为了描述和实现多个程序的并发执行,以改善资源利用率级提高系统的吞吐量。 为什么引入线程?为了减少程序并发执行时系统所付出...
阅读全文
posted @ 2015-07-26 15:32 *桔子*
阅读(124)
评论(0)
推荐(0)
2015年7月25日
LRU cache
摘要: class LRUCache{public: //map v; vector v; map m; int s; LRUCache(int capacity) { s=capacity; } void adjust(int key){ ...
阅读全文
posted @ 2015-07-25 23:32 *桔子*
阅读(141)
评论(0)
推荐(0)
Triangle
摘要: class Solution {public: int minimumTotal(vector>& triangle) { int sum=0; if(triangle.size() == 0) return sum; sum = triangle[0][0]; ...
阅读全文
posted @ 2015-07-25 14:37 *桔子*
阅读(193)
评论(0)
推荐(0)
2015年7月24日
Pascal's Triangle II
摘要: class Solution {public: vector getRow(int rowIndex) { vector v; if( rowIndex v1; for(int row=2;row<=rowIndex;...
阅读全文
posted @ 2015-07-24 10:05 *桔子*
阅读(119)
评论(0)
推荐(0)
Pascal's Triangle
摘要: class Solution {public: vector> generate(int numRows) { vector> vv; vector v_arr[numRows+1]; if( numRows <= 0)...
阅读全文
posted @ 2015-07-24 09:44 *桔子*
阅读(122)
评论(0)
推荐(0)
2015年7月23日
Best Time to Buy and Sell Stock II
摘要: class Solution {public: int maxProfit(vector& prices) { int sum = 0; int i=0; int n=prices.size(); int min=INT_MAX; while(i...
阅读全文
posted @ 2015-07-23 21:00 *桔子*
阅读(99)
评论(0)
推荐(0)
Best Time to Buy and Sell Stock
摘要: class Solution {public: int maxProfit(vector& prices) {//eg: 5 6 2 3 1 4;// 记录i之前最小的元素; int min = INT_MAX; int pro = 0; ...
阅读全文
posted @ 2015-07-23 19:33 *桔子*
阅读(115)
评论(0)
推荐(0)
Populating Next Right Pointers in Each Node
摘要: /** * Definition for binary tree with next pointer. * struct TreeLinkNode { * int val; * TreeLinkNode *left, *right, *next; * TreeLinkNode(int x) :...
阅读全文
posted @ 2015-07-23 10:32 *桔子*
阅读(150)
评论(0)
推荐(0)
path sum II
摘要: /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x...
阅读全文
posted @ 2015-07-23 09:33 *桔子*
阅读(158)
评论(0)
推荐(0)
2015年7月22日
Path Sum
摘要: /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x...
阅读全文
posted @ 2015-07-22 21:51 *桔子*
阅读(140)
评论(0)
推荐(0)
上一页
1
···
5
6
7
8
9
10
11
下一页
公告