旋转猫勇闯秋招 level
获赞
209
粉丝
43
关注
20
看过 TA
2614
武汉大学
2026
C++
IP属地:湖北
暂未填写个人简介
私信
关注
04-22 09:31
已编辑
武汉大学 C++
大数据鼠鼠:从业务角度看,携程机票肯定比美团边缘好很多,携程转正率也很高如果有hc的话。但是既然你都已经接了美团offer,毁约大概率秋招被拉黑,个人感觉直接在美团好好干也行毕竟title摆在那
投递携程等公司10个岗位
0 点赞 评论 收藏
分享
04-08 18:05
武汉大学 C++
0 点赞 评论 收藏
分享
04-03 17:42
武汉大学 C++
nico223:游戏测试是掌控版本日大家下班时间大权的
投递网易游戏等公司10个岗位
0 点赞 评论 收藏
分享
04-02 17:11
武汉大学 C++
投递携程等公司10个岗位
0 点赞 评论 收藏
分享
04-01 10:06
武汉大学 C++
问问大佬们(1)class ZeroEvenOdd {    private int n;    ReentrantLock lock = new ReentrantLock(true);    private int x = 1;    private boolean isZero = true;    private Condition condition = lock.newCondition();    public ZeroEvenOdd(int n) {                this.n = n;    }    // printNumber.accept(x) outputs "x", where x is an integer.    public void zero(IntConsumer printNumber) throws InterruptedException {        while(x <= n){                    lock.lock();        if(isZero&&x <= n){            printNumber.accept(0);            isZero = false;            condition.signalAll();        }else{            condition.await();        }        lock.unlock();        }    }    public void even(IntConsumer printNumber) throws InterruptedException {        while(x <= n){        lock.lock();        if(!isZero && x%2 == 0){            printNumber.accept(x);            x++;            isZero = true;            condition.signalAll();        }else{            condition.await();        }        lock.unlock();        }           }    public void odd(IntConsumer printNumber) throws InterruptedException {        while(x <= n){        lock.lock();        if(!isZero && x%2 == 1){            printNumber.accept(x);            x++;            isZero = true;            condition.signalAll();        }else{            condition.await();        }        lock.unlock();        }        }}(2)class ZeroEvenOdd {    private final int n;    private int x = 1;    // true: 打印0  false: 不打印0    private boolean isZero = true;    public ZeroEvenOdd(int n) {        this.n = n;    }    public void zero(IntConsumer printNumber) throws InterruptedException {        while (x <= n) {            synchronized (this) {                if (isZero) {                    printNumber.accept(0);                    isZero = false;                    this.notifyAll();                } else {                    this.wait();                }            }        }    }    public void even(IntConsumer printNumber) throws InterruptedException {        while (x <= n) {            synchronized (this) {                if (x % 2 == 0 && !isZero) {                    printNumber.accept(x);                    isZero = true;                    x++;                    this.notifyAll();                } else {                    this.wait();                }            }        }    }    public void odd(IntConsumer printNumber) throws InterruptedException {        while (x <= n) {            synchronized (this) {                if (x % 2 != 0 && !isZero) {                    printNumber.accept(x);                    isZero = true;                    x++;                    this.notifyAll();                } else {                    this.wait();                }            }        }    }}为什么(1)代码最后可能多输出一个0。(2)代码不会
0 点赞 评论 收藏
分享
03-28 09:20
武汉大学 C++
野猪不是猪🐗:有句话说的很好:黑马redis这东西,你不学不行。但是你要是真把点评写简历上,人家还嫌弃你
0 点赞 评论 收藏
分享

创作者周榜

更多
关注他的用户也关注了:
牛客网
牛客企业服务