匿名1274
(匿名1274)
1
OA的名字是“Clutter Technical Aptitude Test”,时间是45分钟的那个
头两题很简单,不记得了已经。。第三题是利口1181,hackerrank上testcase不全,所以务必记得考虑corner case!
地里可以搜到所有题目,看了各种OA的反馈,应该是先OA再简历。
目测短时间内收到一封 “Thank you for applying to XXX … and unfortunately … moving on to next candidate”
45分钟OA,认真做,稍微准备一下10分钟搞定。
一共两道题:
Q1: 给个String, 输出String最后一个字母和倒数第二个字母,中间用空格隔开。 稍微处理了一下几乎不存在的corner case
Q2: 给了一个List of String, 找到所有能够首尾相连的2个String,组成一个新的String。‘a man on a mission’ + ’ mission
statement’ = ‘a man on a mission statement’
啥时候能正儿八经不欺骗感情的来个面试顺手拿个offer!
818w
2
Given list of phrases, connect all the phrases using common first and last words.
For example,
phrases = {“I like bubblegum”,
“bubblegum that is pink”,
“hi, how are you today”,
“today on this fine day”,
“day that is sunny”
}
The answer will be:
{“I like bubblegum that is pink”, “hi, how are you today on this fine day that is sunny”}
The order of the output phrases doesn’t matter (I think they just want you to connect as many as possible).
Challenge: do this in O(n). They didn’t really define n, I guess they just want you to loop through the phrases a constant number of times?