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

Confluent VO

🔗
匿名用户-QWC3H  2022-8-21 09:16:38 |倒序浏览

2022(7-9月) 码农类General 硕士 全职@confluent - 网上海投 - Onsite  | 😐 Neutral 😐 Average | Other | 在职跳槽

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

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

x
看了很多面经,题库应该很小
coding就四道windowed map, isVaridic, document IDs, delayed schedule
des
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
e

第四轮 doc ID,用linkedlist+hashmap解决的

求米~~

评分

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

查看全部评分


上一篇:谷歌电面 【求解】
下一篇:CFLT SDE2 电面 1+2
推荐
xcmax123 2022-8-21 11:48:47 | 只看该作者
全局:
docid是https://leetcode.com/discuss/int ... -phrase-in-document吗?人家没用linkedlist啊。
求楼主贴一个delayed schedule代码
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-QWC3H  2022-8-21 11:56:03 来自APP
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

🔗
LXU 2022-8-21 12:19:29 来自APP | 只看该作者
全局:
请问楼主windowedmap是在put和get方法里清除expired values吗?已加米,谢谢!
回复

使用道具 举报

🔗
xcmax123 2022-8-21 13:03:11 | 只看该作者
全局:
https://codereview.stackexchange ... thon-task-scheduler 楼主两个版本咋样?需要修改吗?
  1. class Scheduler:
  2.     """A schedule of tasks to be run in background threads. Call the
  3.     schedule method to schedule a task to run at a particular time.
  4.     Call the task's cancel method to cancel it if it has not already
  5.     started running.

  6.     """

  7.     @functools.total_ordering
  8.     class _Task:
  9.         "A scheduled task."

  10.         def __init__(self, fn, start):
  11.             "Create task that will run fn at or after the datetime start."
  12.             self.fn = fn
  13.             self.start = start
  14.             self.cancelled = False

  15.         def __le__(self, other):
  16.             # Tasks compare according to their start time.
  17.             return self.start <= other.start

  18.         @property
  19.         def timeout(self):
  20.             "Return time remaining in seconds before task should start."
  21.             return (self.start - datetime.now()).total_seconds()

  22.         def cancel(self):
  23.             "Cancel task if it has not already started running."
  24.             self.cancelled = True
  25.             logger.info("canceled %s", self)

  26.     def __init__(self):
  27.         cv = self._cv = threading.Condition(threading.Lock())
  28.         tasks = self._tasks = []

  29.         def run():
  30.             while True:
  31.                 with cv:
  32.                     while True:
  33.                         timeout = None
  34.                         while tasks and tasks[0].cancelled:
  35.                             heapq.heappop(tasks)
  36.                         if tasks:
  37.                             timeout = tasks[0].timeout
  38.                             if timeout <= 0:
  39.                                 task = heapq.heappop(tasks)
  40.                                 break
  41.                         cv.wait(timeout=timeout)
  42.                 logger.info("starting task %s", task)
  43.                 threading.Thread(target=task.fn).start()

  44.         threading.Thread(target=run, name='Scheduler').start()
复制代码
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-QWC3H  2022-8-21 16:01:44 来自APP
LXU 发表于 2022-08-20 21:19:29
请问楼主windowedmap是在put和get方法里清除expired values吗?已加米,谢谢!
我没考这个 但应该是的
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-QWC3H  2022-8-21 16:02:40 来自APP
xcmax123 发表于 2022-08-20 22:03:11
https://codereview.stackexchange.com/questions/194922/python-task-scheduler 楼主两个版本咋样?需要修改吗?class Sch
你发的这个很全了写的
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-QWC3H  2022-8-27 08:32:04 来自APP
发了降级包 拒了
回复

使用道具 举报

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

本版积分规则

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