Available question text
Given a binary tree, return the values of all "lonely" nodes — nodes whose parent has exactly one child (i.e., they have no sibling). This is solved by a simple tree traversal that inspects each parent’s child count and collects the sole children.
Related questions
Continue with questions that share topics or the same question type.
- Find All Lonely Numbers in the Array
Coding · Array · Counting · Hash Table
- Find the Maximum Ancestor Value Across All Leaf Nodes in a Binary Tree
Coding
- Add Edges to Make Degrees of All Nodes Even
Coding
- All Nodes Distance K in Binary Tree
Coding · Binary Tree · Breadth-First Search · Depth-First Search
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1469. Find All The Lonely Nodes
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source