Programmer Trainee Interview Questions

712,403 programmer trainee interview questions shared by candidates

Suppose you have an arbitrarily connected graph with n nodes. Come up with an algorithm to identify each set of connected nodes (i.e. identify all the islands in the graph). What's the complexity? Can you find a solution in O(n log n)?
avatar

Software Engineer

Interviewed at Google

4.4
Aug 7, 2010

Suppose you have an arbitrarily connected graph with n nodes. Come up with an algorithm to identify each set of connected nodes (i.e. identify all the islands in the graph). What's the complexity? Can you find a solution in O(n log n)?

Viewing 601 - 610 interview questions

Glassdoor has 712,403 interview questions and reports from Programmer trainee interviews. Prepare for your interview. Get hired. Love your job.