回复: 0
收起左侧

25 Databricks oa | Software Engineering Intern

匿名用户-D3ZBT  2024-8-14 02:00:54
本楼:   👍  0
0%
0%
0   👎

2025(7-9月) 码农类General 硕士 实习@databricks - 网上海投 - 在线笔试  | 😐 Neutral 😐 AverageOther | 应届毕业生

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

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

x
4题,难度总体来说中等,最后一题有几个test case没过。分享求米,谢谢!1. 很简单,略
2,3,4地里都有出现过, 这里再复制黏贴一下

2. given a list of unix commands (cp, ls, mv, $1, $4), return a list of how many times each are called (note $4 ⇒ $1 ⇒ cp)
3. Imagine a board of size numRows × numColumns with some lasers placed on it. These lasers are placed at coordinates specified in the two-dimensional array laserCoordinates, where laserCoordinates[i] is a two-element array containing coordinates for the center of the ith laser. Lasers with a center in a cell (row, column) destroy everything in the same row (i.e. rows with index row) and the same column (i.e. columns with index column).
Now imagine there is a robot at coordinates (curRow, curColumn). The robot can only move in a straight line, either left, right, up, or down within this board. Your task is to count the‍‍‍‍‌‍‌‌‌‍‍‍‌‍‌‍‌‍‌‌ maximum number of cells that the robot can safely move through (in any direction) before being destroyed by lasers.
Note: You can assume that the initial cell is protected, and lasers cannot destroy the robot there even if they cover this cell in their destruction area.
Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than O(numRows · numColumns · laserCoordinates.length) will fit wi
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
find the number of lamps lamps[i] which include this point within its covered segment - when points[j] lies inside the segment [lamps[i][0], lamps[i][1]].
As a result, return an array of integers, where ith integer corresponds to the answer for the ith control point.
Example
For lamps = [[1, 7], [5, 11], [7, 9]] and points = [7, 1, 5, 10, 9, 15], the output should be solution(lamps, points) = [3, 1, 2, 1, 2, 0].

评分

参与人数 3大米 +27 收起 理由
清道神君 + 25 欢迎分享你知道的情况,会给更多大米奖励!
小亩_229492d + 1 给你点个赞!
Kaku770 + 1 很有用的信息!

查看全部评分


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

本版积分规则

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