本帖最后由 theonlyliam 于 2024-1-22 08:56 编辑
要求:需要id+分享屏幕+开摄像头+4题70分钟莫名其妙收到了Ziprecruiter oa,但这公司不是早就招满了吗,但有个白嫖刷分的机会还是踩点写完了,题目都是之前地里出过的,没有拍照。
求加米!!!
1. easy题
input是initialHealth和一个array,根据题目要求,写对应代码计算initialHealth的变化,非常简单。
2. count triple
Given a string ‘sentence’ ,count the number of words which contain triple repeating letters-i.e.,the same letter appearing at least three times. Words in the sentence are a sequence of English letters surrounded by whites pace characters.
Note letters should be counted in a case-insensitive manner.
Also note that you are not expected to provide the most optimal solution,but asolution with time complexity not worse than O(sentence.length * longestWord.length) will fit within the execution time limit.*
Example:
For sentence="Dooddle moodle Pepper unsuccessfully", the output should be solution(sentence)=3
Explanation:
Let's tak person in queue (person 4) starts their ID check. Queue - [].
◦ The fourth (and the last) person finishes their ID check at time 1300.
• For times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], the output should be
solution(times) = [301, 601, 901, 1201, 1501, 1801, 2101, 2401, 2701, 3001, 3301, 3601, 13, 14, 15].
Initially, the first person arrives at time 1 and starts their ID check. The next 11 people arrive at the event and wait in the queue for their ID check. The last three people immediately leave, as they see more than 10 people in the queue.
4. cyclic shift
求加米!!! |