Google | Is Manager?
Anonymous User
2969

Question:

Given as below, find the direct employee of the variables.

manager(P, Q) = P is the manager of Q
manager(Q, R) = Q is the manager of R
peer(R, S) = S is the peer of R.

is_manager(P, S) = True
is_manager(S, Q) = False

The way to solve this might be using breadth-first search.
Anyone has any idea?

Comments (11)