Check Whether a Template Occurs in Leaf Text of a Binary Tree
Asked at Google · Coding Questions · Difficulty: Medium · Last asked Jul 19, 2026
Given a binary tree whose leaves store characters (including possible spaces) and whose internal nodes store no text, visit leaves from left to right and concatenate their characters into a string `S`.
Loading the problem…
More Google interview questions
- LLM conceptual questions
- Implement a Nested Tic-Tac-Toe Game Engine
- ML Fundamentals Deep Dive (AI/ML & MLE Roles)
- Design a Real-Time Product Recommendation System
- Implement Scaled Dot-Product Attention
- Design a Multi-Tenant, Multi-Region API Rate Limiter