1. 设计一个Yelp connect的功能
设计一个Yelp connect的功能,part 1是设计一个follow/unfollow功能,让用户可以follow自己感兴趣的商家。part 2是在part 1的基础上,实现implicit follow,就是即使用户没有点follow button,根据用户行为来判定用户follow了该商家,包括check in,reservation,write review等,这些信息有现有的service提供。并且有一个threshold,就是比如check in 3次,或者review 2次等等才判定用户follow该商家。
2. 两人name的相以度
coding是算两人name的相以度,英文name,用空格分隔,就是intersection/union。然后算Bussiness Object的相似度,然后follow up可以还怎么算。就是name算个相似度,其他的找一些feature算相似度,然后组合在一起就行,只需要说思路
3. 设计time tracking
System Design:设计一个 Time Tracking 的Service用来记录每一个Micro Service所花费的时间。注意要简单写一下Class Structure,APl,读写分开等
4. Sentence Similarity Checker
A sentence is a list of words that are separated by a single space with no leading or trailing spaces. For example, "Hello World", "HELLO", "hello world hello world" are all sentences. Words consist of only uppercase and lowercase English letters.
Two sentences sentence1 and sentence2 are similar if it is possible to insert an arbitrary sentence (possibly empty) inside one of these sentences such that the two sentences become equal. For example, sentence1 = "Hello my name is Jane" and sentence2 = "Hello Jane" can be made equal by inserting "my name is" between "Hello" and "Jane" in sentence2.
Given two sentences sentence1 and sentence2, return true if sentence1 and sentence2 are similar. Otherwise, return false.
Example 1:
Input: sentence1 = "My name is Haley", sentence2 = "My Haley" Output: true Explanation: sentence2 can be turned to sentence1 by inserting "name is" between "My" and "Haley".
Example 2:
Input: sentence1 = "of", sentence2 = "A lot of words" Output: false Explanation: No single sentence can be inserted inside one of the sentences to make it equal to the other.
Example 3:
Input: sentence1 = "Eating right now", sentence2 = "Eating" Output: true Explanation: sentence2 can be turned to sentence1 by inserting "right now" at the end of the sentence.
Constraints:
- 1 <= sentence1.length, sentence2.length <= 100
- sentence1 and sentence2 consist of lowercase and uppercase English letters and spaces.
- The words in sentence1 and sentence2 are separated by a single space.
5. System Design Simplification
Discuss the trade-offs in designing a data warehouse and data pipeline given a simplified schema. What considerations would you take into account?