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

方块店面

🔗
匿名用户-DNFYX  2022-8-7 04:39:37 |倒序浏览

2022(7-9月) 码农类General 本科 全职@square - 网上海投 - 技术电面  | 😃 Positive 😐 Average | Pass | 在职跳槽

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

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

x
两个礼拜前的店面,一开始只给了part 1然后写出来了再给part 2 跟 part 3

面试官人挺好的, 一周之后通知过了约onsite

# ######### PART 1 #########
# We've been asked by an up-and-coming airport to help them quickly and efficiently build daily departure schedules!

# Part 1: Straightforward Schedule
# Before the start of each day, all airliners are required to send in their planned departures for that day. For each flight, the airliners provide three pieces of information: a flight id, a planned departure time, and the number of passengers on each flight. We want to determine if a given schedule is possible (i.e. no scheduling conflicts), and if so, we want to be able to build and return the schedule, ordered from earliest to latest departure.

# Our airport only has one runway. A scheduling conflict is determined by the existence of more than one flight with the same departure time.

# A flight has an id, time, passengers.

# As an example, if this was the set of flights requested for the day:
# United_123, 05:30, 180
# Alaska_475, 14:50, 92
# Alaska_472, 16:00, 48
# Southwest_447, 07:30, 176
# Southwest_847, 15:10, 151

# We would want our scheduler to return an ordered schedule like the following:
# [
#   <United_123, 05:30, 180>,
#   <Southwest_447, 07:30, 176>,
#   <Alaska_475, 14:50, 92>,
#   <Southwest_847, 15:10, 151>,
#   <Alaska_472, 16:00, 48>,
# ]

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

评分

参与人数 4大米 +24 收起 理由
nsbdsxh + 2 很有用的信息!
cherrypick + 1 给你点个赞!
754490227 + 1 给你点个赞!
匿名用户-IV8ZR + 20

查看全部评分


上一篇:Imprint电面面经
下一篇:MathWorks EDG OA

本帖被以下淘专辑推荐:

  • · 面巾|主题: 15, 订阅: 1
地里匿名用户
推荐
匿名用户-LIFXZ  2022-9-25 08:07:35
感谢楼主!!

想问下:
这题有提每架飞机会占跑道多久吗?还是只要departure time不一样就可以了,e.g 16:00跟16:01没有conflict?
还有这个passenger人数有什么用吗,如果confllict, 需要优先安排人多的飞机在schedule里面吗?
回复

使用道具 举报

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

本版积分规则

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