There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to...
分类:
其他好文 时间:
2015-05-15 01:02:35
阅读次数:
157
There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to firs...
分类:
其他好文 时间:
2015-05-14 18:00:08
阅读次数:
137
题目
思路
还是拓扑排序的思路。需要注意的是,这题的量变大了,会有2000门或以上的课,因此用malloc动态分配数组。
其实C真的挺好玩。代码int * findOrder(int numCourses, int ** prerequisites, int prerequisitesRowSize, int prerequisitesColSize, int * returnSize) {...
分类:
其他好文 时间:
2015-05-14 16:40:02
阅读次数:
135
题目:leetcode
Course Schedule II
There are a total of n courses you have to take, labeled from 0 to n
- 1.
Some courses may have prerequisites, for example to take course 0 you have ...
分类:
其他好文 时间:
2015-05-14 12:09:02
阅读次数:
119
There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to firs...
分类:
其他好文 时间:
2015-05-14 00:57:32
阅读次数:
98
并发调度的可串行性DBMS对并发事务不同的调度(schedule)可能会产生不同的结果
什么样的调度是正确的?串行化(Serial)调度是正确的
对于串行调度,各个事务的操作没有交叉,也就没有相互干扰,当然也不会产生并发所引起的。如前所述,事务对数据库的作用是将数据库从一个一致的状态转变为另一个一致的状态。多个事务串行执行后,数据库仍旧保持一致的状态。可串行化(Serializable)调度...
分类:
数据库 时间:
2015-05-12 18:53:10
阅读次数:
211
题目There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pai...
分类:
其他好文 时间:
2015-05-11 16:07:36
阅读次数:
113
1、内核如何为不同的请求提供服务
(1)内核抢占:如果一个进程还在处理一个异常的时候,分配给它的时间片到期了,会发生什么事情呢?这取决于有没有启用内核抢占(Kernel Preemption),如果没有启用,进程就继续处理异常,如果启用了,进程可能会立即被抢占,异常的处理也就暂停了,直到schedule()再度选择原先那个进程(注意:内核处理中断的时候,必然会禁用内核抢占,所以这里才说是异常)。...
分类:
其他好文 时间:
2015-05-11 08:51:21
阅读次数:
131
使用的模块node-schedule的使用例子:1:确定时间var schedule = require("node-schedule");console.log("执行任务开始"); var date = new Date(2015,4,9,23,44,0); var j = sche...
分类:
Web程序 时间:
2015-05-10 00:57:54
阅读次数:
241
题目
思路
明显的拓扑排序。
这里用的C写,用malloc动态分配内存给二维数组挺烦的,当做锻炼吧。代码bool canFinish(int numCourses, int** prerequisites, int prerequisitesRowSize, int prerequisitesColSize) {
int * Indegrees;
bool ** IsConne...
分类:
其他好文 时间:
2015-05-07 16:51:44
阅读次数:
132