Google | On-site | New grad SWE
Anonymous User
2672

Q1. Given a table of rules, write a function to check if it contains conflicting rules. Two rules are conflicting if their conditions match but values do not. Conditions can contain don't cares denoted by '-'. Has to be done in O(n) time.

e.g
Rule Conditions Value
R1 C1,C2,C3 40
R2 BCD1,BC5 40
R3 BCD1,BC5 80
Here, R2 and R3 conflict.
e.g
R1 C1,C2,C3 40
R2 BCD1,BC5 50
R3 BCD1,- 50
R6 -,-,C3 40
No conflicts.

Q2. same as Round 4: https://leetcode.com/discuss/interview-question/930843/google-l3-onsite

Q3. Don't remember the exact question but it boiled down to Employee Importance

Q4. Given an n-ary tree, a monkey starts from the top of the tree and can climb to any of its children or stay at the same position (cannot jump more than one step). Write a function to find the probability of finding the monkey at a particular node at a time 't'.

Comments (6)