注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
看了一下笔记,还有当年电面的完整记录,分享给大家。看着当年自己还挺强的啊,这样题目都过了,一小时两题:
/**
* Sample input:
*
* 1
* / \
* 3 5
* / / \
* 2 4 7
* / \ \
* 9 6 8
*
* Expected output:
* 1
* 3 5
* 2 4 7
* 9 6 8
* ==========
*/
class TreePrinter {
static class Node {
int value;
Node left;
Node right;
public Node(int value, Node left, Node right) {
this.value = value;
this.left = left;
this.right = right;
}
}
public void print 0 && end == holder.size() - 1) || front == end - 1){
this.wait();
}
this.holder[end++] = newElem;
if(end > holder.size() - 1) {
this.end = 0;
}
this.notify();
}
}
Onsite具体内容记不清楚了,但是记得系统设计是类似TinyUrl的一个系统,当时挂在这个上面了,可惜可惜。
谢谢大家,有米请赏
|