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

Roblox Karat电面

🔗
匿名用户-DEDJL  2021-10-18 07:24:10 |倒序浏览

2021(10-12月) 码农类General 硕士 全职@roblox - 网上海投 - 技术电面  | 😐 Neutral 😐 Average | Other | 在职跳槽

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

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

x
面经题, Intro (1 min) + Social Media API design (25 min) + Scrambled Wo
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
下面是原题和test case:
  1. After catching your classroom students cheating before, you realize your students are getting craftier and hiding words in 2D grids of letters. The word may start anywhere in the grid, and consecutive letters can be either immediately below or immediately to the right of the previous letter.

  2. Given a grid and a word, write a function that returns the location of the word in the grid as a list of coordinates. If there are multiple matches, return any one.

  3. grid1 = [
  4.         ['c', 'c', 'x', 't', 'i', 'b'],
  5.         ['c', 'c', 'a', 't', 'n', 'i'],
  6.         ['a', 'c', 'n', 'n', 't', 't'],
  7.         ['t', 'c', 's', 'i', 'p', 't'],
  8.         ['a', 'o', 'o', 'o', 'a', 'a'],
  9.         ['o', 'a', 'a', 'a', 'o', 'o'],
  10.         ['k', 'a', 'i', 'c', 'k', 'i'],
  11. ]
  12. word1 = "catnip"
  13. word2 = "cccc"
  14. word3 = "s"
  15. word4 = "bit"
  16. word5 = "aoi"
  17. word6 = "ki"
  18. word7 = "aaa"
  19. word8 = "ooo"

  20. grid2 = [['a']]
  21. word9 = "a"

  22. find_word_location(grid1, word1) => [ (1, 1), (1, 2), (1, 3), (2, 3), (3, 3), (3, 4) ]
  23. find_word_location(grid1, word2) =>
  24.        [(0, 1), (1, 1), (2, 1), (3, 1)]
  25.     OR [(0, 0), (1, 0), (1, 1), (2, 1)]
  26.     OR [(0, 0), (0, 1), (1, 1), (2, 1)]
  27.     OR [(1, 0), (1, 1), (2, 1), (3, 1)]
  28. find_word_location(grid1, word3) => [(3, 2)]
  29. find_word_location(grid1, word4) => [(0, 5), (1, 5), (2, 5)]
  30. find_word_location(grid1, word5) => [(4, 5), (5, 5), (6, 5)]
  31. find_word_location(grid1, word6) => [(6, 4), (6, 5)]
  32. find_word_location(grid1, word7) => [(5, 1), (5, 2), (5, 3)]
  33. find_word_location(grid1, word8) => [(4, 1), (4, 2), (4, 3)]
  34. find_word_location(grid2, word9) => [(0, 0)]

  35. Complexity analysis variables:

  36. r = number of rows
  37. c = number of columns
  38. w = length of the word
复制代码
如果有用,请加米!



评分

参与人数 5大米 +11 收起 理由
anyever + 1 欢迎分享你知道的情况,会给更多积分奖励!
ruoyi.rrr + 5
bryanjhy + 3 给你点个赞!
xiaoyucool + 1 给你点个赞!
lipp16 + 1 给你点个赞!

查看全部评分


上一篇:一杯ng OA
下一篇:Palantir FDSE 挂经
🔗
liyoulu 2021-10-25 03:28:28 | 只看该作者
全局:
what is Scrambled Word thanks
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-DEDJL  2021-10-25 06:11:50
liyoulu 发表于 2021-10-24 12:28
what is Scrambled Word thanks

就是https://www.1point3acres.com/bbs/thread-804050-1-1.html 里面的第一题,本身挺简单的
回复

使用道具 举报

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

本版积分规则

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