
408考研
文章平均质量分 51
九死九歌
丹书铁契!
展开
-
【操作系统 & 图论】传参一个AOE图,得到按其拓扑排序及权值执行临界区代码的线程数组
import java.util.concurrent.Semaphore;public class Solution { final static float INF = Float.POSITIVE_INFINITY; static Semaphore[][] semaphores; public static Thread[] AOEThreads(float[][] matrix) { semaphores = new Semaphore[matrix.length][matri原创 2022-02-08 17:47:20 · 391 阅读 · 0 评论 -
【数据结构与算法】王道考研数据结构与算法2022配套大题第二章(java语言描述)
2.2.3 顺序表 顺序表内容如下:class ArrayList { public int[] arr; public int length; public ArrayList(int[] arr, int length) { if (arr.length < length) { /* 给数组扩容,不过我这里没有实现扩容的方法,所以直接抛出异常 */ throw new IllegalArgumentException(); } this.arr原创 2021-10-29 00:07:28 · 1201 阅读 · 2 评论