Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Count Islands in Binary Trees
Given a binary tree where nodes have values (typically 0 or 1), analyze the 'islands' (connected components of similar values) within the tree. Tasks include counting the total number of islands, identifying unique island types based on their structure and size, and analyzing different patterns of island formations. An island is defined as a connected group of nodes with the same value.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid January, 2025
Mid-level
Return the sizes of unique islands in a Binary Tree
Late December, 2024
Mid-level
Max Size of Islands in a Tree
Late September, 2024
Intern
Count the number of islands in a binary tree where nodes have values 0 or 1. An island is a collection of 1's.
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.