Google intern interview experience

google logo
google
· intern
February 4, 2026 · 18 reads

Summary

I had an intern interview at Google where I was asked to determine if a given parent array forms a valid tree structure.

Full Experience

I had an interview for an intern position at Google. The problem statement given was: Problem statement:
Given an array where each element specifies the parent of a node, determine whether the structure forms a valid tree.

My approach involved building an adjacency list and validating tree properties. I started a DFS from the root, ensuring no cycles and full connectivity.

Interview Questions (1)

1.

Validate Tree Structure from Parent Array

Data Structures & Algorithms

Given an array where each element specifies the parent of a node, determine whether the structure forms a valid tree.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!