Google intern interview experience
- Posted
- 4 Feb 2026
Summary
I had an intern interview at Google where I was asked to determine if a given parent array forms a valid tree structure.
How it went
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.
Questions asked (1)
- 01
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.