注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 匿名 于 2022-3-30 17:40 编辑
Uber OA
不废话,直接上题
一共四道,70分钟, 时间还是挺紧张的,建议的做题顺序是1-2-4-3. 第三题一般都是模拟题,不难倒是code量特别大,比较耗时。
1. 给一个数number和一个数组nums[],数组中每个数是对number的操作。经过数组中每个element对number的操作之后,判断number在哪个区间,返回对应区间的level 名称。 e.g.: number = 10, nums[100, -20, -3]. 10 + 100 - 20 - 3 = 87. 87 对应 “good”, 返回good。题目中给了level 区间,这里就不赘述了。很简单,for loop一遍出来
2. 给一个text 和 n, count the number of words in text containing exactly n times consecutive repeat characters. e.g.: text: "all hello", n = 2, return 2, 因为all 和 hello 中的 l 都正好连续出现两次,所以返回2
若果query是[1, 3], 就是在a[] b[]两个数组中找到所有加和为3的pairs, 记录the number of pairs。最后要求返回 a list of number of pairs for each finding sum operation.
都看到这了,求米求米求米~~
[/i] |