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

CaaS Capital coding challenge

🔗
匿名用户-9QYXF  2022-6-25 23:55:49 |倒序浏览

2022(4-6月) 金工类 硕士 全职@caascap - 网上海投 - 在线笔试  | 😐 Neutral 😣 Hard | Fail | 在职跳槽
网上海投的CaaS Capital的quantitative researcher岗,结果很意外的收到了Coding challenge
90道题 5分钟,因为之前自己没怎么刷过算法题,感觉还是挺难的。。。肯定是没戏了。
(怕被人肉,所以匿名发了这个贴子)

第一题 Stock Picker (Medium)
Have the function StockPicker(arr) take the array of numbers stored in arr which will contain integers that represent the amount in dollars that a single stock is worth, and return the maximum profit that could have been made by buying stock on day x and selling stock on day y where y > x. For example: if arr is [44, 30, 24, 32, 35, 30, 40, 38, 15] then your program should return 16 because at index 2 the stock was worth $24 and at index 6 the stock was then worth $40, so if you bought the stock at 24 and sold it at 40, you would have made a profit of $16, which is the maximum profit that could have been made with this list of stock prices.


If there is not profit that could have been made with the stock prices, then your program should return -1. For example: arr is [10, 9, 8, 2] then your program should return -1.


Examples
Input: [10,12,4,5,9]
Output: 5
Input: [14,20,4,12,5,11]
Output: 8


第二题 Blackjack Highest (hard)
Have the function BlackjackHighest(strArr) take the strArr parameter being passed which will be an array of numbers a
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
s a single alphabetic character, the ($) character represents a number between 1-9, and the asterisk (*) represents a sequence of the same character of length 3 unless it is followed by {N} which represents how many characters should appear in the sequence where N will be at least 1. Your goal is to determine if the second string exactly matches the pattern of the first string in the input.

For example: if str is "++*{5} jtggggg" then the second string in this case does match the pattern, so your program should return the string true. If the second string does not match the pattern your program should return the string false.

Examples
Input: "+++++* abcdehhhhhh"
Output: false
Input: "$**+*{2} 9mmmrrrkbb"
Output: true























本帖子中包含更多资源

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

x

评分

参与人数 4大米 +23 收起 理由
sherry_LiuYJ + 1 给你点个赞!
JimHillo + 1 欢迎分享你知道的情况,会给更多积分奖励!
微信用户_a611ff0 + 1 给你点个赞!
匿名用户-IWHGR + 20

查看全部评分


上一篇:google MLE onsite
下一篇:斯内普店面挂经
地里匿名用户
🔗
匿名用户-MKCJQ  2022-9-11 23:35:23
这家很少听说,不知道实际情况如何,好奇
回复

使用道具 举报

🔗
Tomxian1994 2023-1-1 04:45:22 | 只看该作者
全局:
请问OA之后多久能收到答复?
回复

使用道具 举报

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

本版积分规则

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