sxs155933
BAN USER
Comments (4)
Reputation 0
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
ChrisK, what i have understood from your explanation is...
- sxs155933 July 17, 2017Let us say a graph have n nodes.... where each node has a propery called visitedcount.
let the number of office spaces be 3.
so 3 origins am adding to queue with 3 visitedsets.
in Bfs function, whenever a node is visited from one of the origin as a source, its node.visitedcount is increased by 1. if it is equal to 3-meaning if it is the first node visited by all the 3 origins, then we return this node as our answer. am i correct Chrisk?