自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 问答 (3)
  • 收藏
  • 关注

原创 哲学家就餐问题解决方案(java)

public class Solution implements Runnable { Semaphore first=new Semaphore(3); Semaphore second=new Semaphore(2); boolean[] chopsticks =new boolean[5]; @Override public void run() { int id=((int)Thread.currentThread().getId())%5; try { getchopst

2021-06-11 15:18:02 175 1

原创 Definition of Interrupt

External interrupts are raised from outside the CPU.Many I/O devices raise interrupts (e.g., keyboard, timer, disk drives, CD-ROM and sound cards). Internal interrupts are raised from within the CPU, either from an error or the interrupt instruction. Er.

2021-06-04 17:34:15 175

原创 makefile的:=

=和:= :=只能引用前文已经定义的变量 one:=$(two) two=two all: echo $(one)#不输出two :=右边可以引用自身再追加 one=one one:=$(one) append all: @echo $(one)#输出one append

2021-05-26 20:13:37 93

原创 TCP三次握手的个人理解

TCP三次握手过程 1.A端发送hello报文。 2.B端收到hello报文。 A、B目前对彼此能力的了解情况 3.B端发送ack报文。 4.A端收到ack报文。 A、B此时已知的情况 5.A端发送ack报文。 6.B端收到ack报文。 第三次握手可以携带数据了。 ...

2021-03-22 19:35:34 135

原创 HashMap.putVal方法解析

HashMap.putVal方法解析 final V putVal(int hash, K key, V value, boolean onlyIfAbsent, boolean evict) { Node<K, V>[] tab; Node<K, V> p; int n, i; //初始化hashmap if ((tab = table) == null || (n = tab.length) == 0) n = (tab = resize()).le

2021-03-02 12:51:32 159

原创 红黑树删除操作规则

//x=替代节点的替代节点,w=x节点的兄弟节点 case 0. 0.1 x节点为红色,则将x变黑。 case 1. x节点为黑色w节点为红色; 1.1 将w变黑; 1.2 x.p变红; 1.4 如果x是左节点左旋,如果x是右节点右旋; 1.5 改变w节点,如果x是左节点,将w=x.p.right;如果x是右节点w=x.p.left; 1.6 最后根据x和w的情况进行平衡。 case 2. 节点x为黑色且兄弟节点w和兄弟节点的子节点都为黑色...

2021-02-04 11:21:14 163

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除