📣 黑五价提前开抢|VIP一年通行证5折,蓝莓、Offer多多同步特惠
回复: 5
跳转到指定楼层
上一主题 下一主题
收起左侧

买它

🔗
匿名用户-LFK4E  2021-11-19 08:08:31 |倒序浏览

2021(10-12月) 码农类General 硕士 全职@meta - Other - 技术电面 Onsite  | 😃 Positive 😐 Average | Pass | 在职跳槽

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

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

x
店面:
尔幺吴,
给你一个数组里面都是string  arr["foo", "bar"], 一个pattern "
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
log system
-----
bq 印度老哥,看上去是个不苟言笑的人,但是人很好

希望帮到大家

评分

参与人数 3大米 +4 收起 理由
月黑风高 + 1 很有用的信息!
tamitito + 1 很有用的信息!
wtcupup + 2 给你点个赞!

查看全部评分


上一篇:Samsara SDE summer intern OA
下一篇:Roblox Karat面经
🔗
wtcupup 2021-11-19 08:17:15 | 只看该作者
全局:
设计log system有比较好的资料可以参考嘛?
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-LFK4E  2021-11-19 08:33:04 来自APP
wtcupup 发表于 2021-11-18 16:17:15
设计log system有比较好的资料可以参考嘛?
我其实也没有特别好的材料,但是可以看看no sql db在存储log 数据时的应用。
回复

使用道具 举报

🔗
WYXhshah 2021-12-2 23:45:43 | 只看该作者
全局:
第二道题跟莉蔻依流祎基本一致吧
回复

使用道具 举报

全局:
第一题写了一下

  1. import collections

  2. class TrieNode:

  3.     def __init__(self) -> None:
  4.         self.children = collections.defaultdict(TrieNode)
  5.         self.word = None

  6. class Trie:

  7.     def __init__(self) -> None:
  8.         self.root = TrieNode()
  9.    
  10.     def add(self, word):
  11.         node = self.root
  12.         for ch in word:
  13.             node = node.children[ch]
  14.         node.word = word

  15. def findPatternWords(words, pattern):
  16.     trie = Trie()
  17.     for word in words:
  18.         trie.add(word)
  19.    
  20.     res = []
  21.     helper(trie.root, pattern, 0, 1, res)
  22.     return res

  23. def helper(node, pattern, i, k, res):
  24.     if not node or k < 0:
  25.         return
  26.    
  27.     if i == len(pattern):
  28.         if node.word != None:
  29.             res.append(node.word)
  30.         return
  31.    
  32.     ch = pattern[i]
  33.     for key in node.children:
  34.         if key == ch:
  35.             helper(node.children.get(key), pattern, i+1, k, res)
  36.         else:
  37.             helper(node.children.get(key), pattern, i+1, k-1, res)

  38. words = ["foo", "bar", "form", "bor", "cor", "fok", "ftr", "ofor"]
  39. pattern = "for"

  40. print(findPatternWords(words, pattern))
  41.    
  42.    
  43.    
复制代码
回复

使用道具 举报

🔗
amazonboss 2021-12-9 05:15:14 | 只看该作者
全局:
本帖最后由 amazonboss 于 2021-12-8 13:16 编辑
WYXhshah 发表于 2021-12-2 07:45
第二道题跟莉蔻依流祎基本一致吧

上网查了一下才知道这个祎的读音。。。原来是语文考试 哈哈   另外,同意跟这道题一样
回复

使用道具 举报

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

本版积分规则

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