Facebook | Onsite | Possibility of user moving from one page to another
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2019-05-20Added By Anonymous
Source: Link
Company: Meta (Facebook)
Role: Data Engineer
Interview Stage: Onsite
Location: unknown
Year: unknown
Original Post Content:
Position: Data Engineer
Given a log file with data like:
USER FROM_PAGE TO_PAGE
A url1 url2
A url1 url3
B url1 url3
A url2 url3
...
...
url can be string like www.leetcode.com/activity/xyz
Return the possibility of any user moving from one page to another page
Ex output should be like:
user A:
url1 ---> url2: 50%
url1 ---> url3: 50%
url2 ---> url3 : 100%
user B:
url1 ---> url2 : 100%