注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 artbite008 于 2025-1-12 11:00 编辑
前后面了2次,一面是日本人manager,用英语聊了三四十分钟,聊得比较happy,结束的时候提醒我后面的coding面试要注意和面试官的沟通。
二面是一个波兰人工程师,名字里面有个Rafal,题目是action log,我的方案是先把log bui别人指鹿为马说人家不通过,我做不到,心里的那道坎是迈不过去的。不知道老外怎么能做到这点,想想挺NB的。
我的数据结构:- data class Node(val actionName: String, var count: Int){
- val subNodes: MutableMap<String, Node> = mutableMapOf()
- }
复制代码 我的output- root(0)
- ->A(2)
- ->->B(2)
- ->->->C(1)
- ->->->A(1)
- ->B(1)
- ->->B(1)
复制代码 题目:- /*
- As we build various product features and want to better understand how our users interact with our platform and understand their “journey” as they navigate through our offerings. Let’s say our system generates logs showing actions of users who are using our platform. Here is an example of such log showing three users performing different sequence of actions:
- Sample log messages:
- """
- USER TIME ACTION
- 100 1000 A
- 200 1100 A
- 200 1200 B
- 100 1200 B
- 100 1300 C
- 200 1400 A
- 300 1500 B
- 300 1550 B
- """
- If we were to summarize their “journeys” through our system with the sequence of events, we could summarize unique action paths in the following summary showing frequent user action paths:
- Sample output:
- """
- A (2)
- -> B (2)
- -> C (1)
- -> A (1)
- B (1)
- -> B (1)
- """
- The output shows that there were two users who started at A, then two users also continued to B. Afterwards one user went to C and one user went to A. Only one user started with B and then continued to B.
- Please implement this type of analysis off of action logs as in the sample above.
- */
复制代码 |