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

Optiver OA 特别难 加米发答案, 加米不扣米

 
🔗
匿名用户-DZFIM  2024-10-30 09:14:54 |倒序浏览

2025(4-6月) 码农类General 硕士 实习@Optiver - 网上海投 - 在线笔试  | 🙁 Negative 😫 Hardest | Other | 应届毕业生

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

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

x

第一题:Question Description The task is to simulate a supermarket checkout system with multiple checkout lines. Customers enter the supermarket with a set number of items, queue up in specific checkout lines, and exit the supermarket once all their items are processed.  Key Rules and Actions Customer Entry and Line Joining:  Customers are assigned a checkout line and a specific number of items upon entering. A customer cannot switch lines after joining. Basket Modification:  Customers can add or remove items from their basket. If items are added, the customer must move to the back of the same line. If items are removed, the customer remains in their position in the line. Checkout Processing:  LineService: Processes a specified number of items in a particular line. LinesService: Processes one item for each customer across all active lines. Customer Exit:  A customer leaves the supermarket as soon as they have no items left. If multiple customers reach zero items at the same time, the one with the line closest to the exit leaves first. Methods to Implement on_customer_enter(customer_id, line_number, num_items):  Adds a customer to a specified line with a set number of items. on_basket_change(customer_id, new_num_items):  Updates the number of items for a customer. Moves the customer to the back of the line if items increase. on_line_service(line_number, num_processed_items):  Processes a specific number of items in a given line. Removes customers with zero items and calls on_customer_exit. on_lines_service():  Processes one item per line, across all lines. Removes customers with zero items and calls on_customer_exit. on_customer_exit(customer_id) (pre-implemented):  Prints the custom
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
e show goes as follows:  8 minutes after the start of the show a lion with a height of 200cm enters the room - based on the schedule it is not one of ours. 10 minutes after the start of the show two lions enter the room: a 310cm one and a 300cm one. The second one is marry. We do an inspection, but unfortunately marry is not the biggest lion in the room, so we return an empty list. 13 minutes after the start of the show rob enters the room and the unknown 310cm lion exits it. We do an inspection. Both marry and rob are higher than the 200cm height lion that entered the room at the 8th minute of the show, so we return both names. 15 minutes after the start of the show marry leaves the room. We do an inspection. rob is still the biggest lion in the room. 16 and 20 minutes after the start of the show both remaining lions exit the room.

我知道不好读但是照片有水印,加米我直接发🐎

评分

参与人数 22大米 +32 收起 理由
hanhanxinxin + 1 赞一个
微信用户_l2n2l + 1 赞一个
calm-furious + 1 赞一个
opopxps + 1 给你点个赞!
RhimmeiYum + 2 欢迎分享你知道的情况,会给更多积分奖励!

查看全部评分


上一篇:刀大师vo疑惑
下一篇:亚麻L5新鲜挂经
全局:
已经加米啦,请问可以发个🐎吗??求求
回复

使用道具 举报

推荐
terrapin 2024-11-7 09:20:38 | 只看该作者
全局:
回复

使用道具 举报

全局:
which location are you applying to?
回复

使用道具 举报

全局:
加了米,然后怎么发呀
回复

使用道具 举报

全局:
求答案,已加米
xzhyqq866
艾特
163
dot
com
回复

使用道具 举报

全局:
加了!求答案!
回复

使用道具 举报

全局:
已加米!求回复
回复

使用道具 举报

🔗
khoojohn176 2024-11-23 17:54:33 | 只看该作者
全局:
加了米,能发给我吗?谢谢!
回复

使用道具 举报

全局:
已加米,reversal66 艾特 icloud 点com求资料谢谢!
回复

使用道具 举报

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

本版积分规则

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