回复: 6
跳转到指定楼层
上一主题 下一主题
收起左侧

到大师vo

全局:

2022(1-3月) 码农类General 硕士 全职@doordash - 猎头 - Onsite  | 🙁 Negative 😐 Average | Fail | 在职跳槽

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
[url=]
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
[/url]


评分

参与人数 1大米 +5 收起 理由
匿名用户-3R6KC + 5

查看全部评分


上一篇:谷歌新鲜昂赛面经
下一篇:亚麻天坑 ! ! 血泪, 收到的亚麻OA不完整被拒, 如何投诉? 如何解决?
🔗
csmyhappy 2022-1-30 08:02:01 | 只看该作者
全局:
请问file system这题 monitor和callack具体requirement是什么啊
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-ZZ1K1  2022-3-5 05:50:30
同问file system 的monitor 和callback
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-ZZ1K1  2022-3-5 06:00:03
Definitions:
path is a / separate string describing the node. Example /animals/dogs/german_shepard
Values are all strings
API:
get(path): String -> returns the value of a the node at the given path
set(path, value) -> changes the value of a given node to the new value. Should error out if the path does not currently exist
create(path, value) -> creates a new node and sets it to the given value. Should error out if the node already exists or if the node’s parent does not exist. That is /level1/level2 cannot be created if /level1 has not already been created
delete(path) -> deletes a node, but ONLY if it has no children

Follow up:
New API:
watch(path, callback_func) -> this allows a user to ‘watch’ a path and have a callback_function called whenever this node, or any child nodes are created/modified. The callback func should be of the form: fun callback(event: String, path: String, old_value: String?, new_value: String?).
Callbacks definition:
get operation # call with ('get', path, value, nil)
set operation # call with ('set', path, old_value, new_value)
create operation # call with ('create', path, nil, value)
delete operation # call with ('delete', path, value, nil)
Example: If we watch /animals/dogs than any time we change the value of /animals/dogs, or if we create any new sub nodes (ex: /animals/dogs/german_shepard or /animals/dogs/poodle/toy) we should call the callback function. The path passed in to the callback function should be the path of the node that was modified, NOT necessarily the path of the node that was watch’d (unless that happens to be the node modified). If a node is being created old_value is null, if a node is being deleted new_value is null.
回复

使用道具 举报

🔗
billyRandom 2022-3-7 07:24:00 | 只看该作者
全局:
Java 怎么用call back function?
回复

使用道具 举报

🔗
billyRandom 2022-3-7 07:46:20 | 只看该作者
全局:
楼主面的是backend 吗?
回复

使用道具 举报

🔗
 楼主| balablamoxian 2022-3-7 11:34:13 | 只看该作者
全局:
才看到  面的是backend   不是js的callback   就是这么个抽象概念  上面有个回复基本上和我面得一样
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表