![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
IT开发者
云代码的专栏 http://yuncode.net/guojianfeng
展开
-
c++快速排序
完整代码:http://yuncode.net/code/c_503e1e448ba7745 核心代码: 08 int partition ( int a[], int low, int high ) 09 { 10 //选择第一个a[low]作为划分的临界值 11 while ( low 12 { 13 while (转载 2012-10-09 21:22:26 · 512 阅读 · 0 评论 -
C++ 银行家算法
完整源代码:http://yuncode.net/code/c_50797f9ec7ad094 算法: 1.试分配 2.安全性测试 3.如果找到一个安全序列,过安全检测,分配完成; 否则不能过安全检测,系统已恢复试分配前状态 #include using namespace std; int avaResour[3]={3,3,2}; int allocatio原创 2012-10-14 10:53:55 · 866 阅读 · 0 评论