Google

  www.google.com
Work in HR? Unlock Free Profile

Google Software Engineer Interview Question

I interviewed in New York, NY and was asked:
"The question was on n-ary tree data stream. Not unexpected, but there was a misunderstanding between myself and the interviewer. The question is to find the head of the tree given a data stream of key value pairs."
Add Tags [?]
Answer

Part of a Software Engineer Interview Review - one of 3,029 Google Interview Reviews

Answers & Comments

1
of 1
vote
think of the tree as an acyclic graph, use dfs to obtain topological order, head of the tree is the first node in topological order
- Cathy Liu on Jun 8, 2014

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.