- 博客(9)
- 资源 (1)
- 收藏
- 关注
原创 Java 堆排序
public class Heap { /** * 根据给定的数组以及 数组的取值范围 lastIndex 构造大顶堆; * 步骤: * 1.从最后一个非叶子节点((lastIndex-1)/2)开始往上遍历所有的非叶子节点((lastIndx-1)/2,.....,0) * 2.对于每一个非叶子节点K * 2.1 判断是否含有孩子节点,并找到比K节点值大的最大
2015-08-21 14:12:04
351
原创 Object.wait()
package JUC;/** * Causes the current thread to wait until either another thread invokes the * {@link java.lang.Object#notify()} method or the * {@link java.lang.Object#notifyAll()} method for t
2015-08-12 15:32:30
480
原创 Java Thread yield()
package Thread;public class MyThread implements Runnable{ protected int countDown = 10; private static int taskCount = 0; private final int id = taskCount++; public MyThread(){} public
2015-04-21 22:08:32
337
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人