上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要: 1、什么是进程与线程 进程是一个拥有资源的独立单位,是进程是程序的一次执行; 线程是进程中的一个实体,是调度的基本单位。2、为什么要有进程和线程 操作系统引入进程的目的是,为了描述和实现多个程序的并发执行,以改善资源利用率级提高系统的吞吐量。 为什么引入线程?为了减少程序并发执行时系统所付出... 阅读全文
posted @ 2015-07-26 15:32 *桔子* 阅读(124) 评论(0) 推荐(0)
摘要: 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)
摘要: 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)
摘要: 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)
摘要: 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)
摘要: 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)
摘要: 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)
摘要: /** * 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)
摘要: /** * 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)
摘要: /** * 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 下一页