注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 匿名 于 2021-10-23 07:08 编辑
一开始的店面:
类似利扣381 Insert Delete GetRandom O(1) - Duplicates allowed
实现一个dictionary, which support get, put, _0 ]Find POPUP, make all the sibling of POPUP to hidden
Find out POPUP's parent, make all the sibling of parent to hidden- private static class DomNode {
- String id;
- boolean hidden;
- List<DomNode> children;
- public DomNode(String id, boolean hidden, List<DomNode> children) {
- this.hidden = hidden;
- this.id = id;
- this.children = children;
- }
- }
复制代码 |