Pinterest Phone interview SWE
Anonymous User
2402

I was asked a graph question to essentially find the path with the highest cost.

Input is something like this (im just making this example up and simplifying it):

Dependency graph:
a:[]
b:[]
c:[a,b]
d:[a,c]
e:[c,d]

Cost:
a:10
b:10
c:20
d:30
e:50

It's a pretty simple quesiton, but the way it was presented got me confused at first and took me a while to boil it down to a simple dfs. managed to solve the question with time running out.
I guess interviewer was expecting to have time left and discuss other things -> Rejected.

Comments (5)