Back to QuestionsPractice with This Question
Binary Tree Paths (DFS)
107.6K views•Asked at Salesforce•
Easy
Question Explain
Given the root of a binary tree, return all root-to-leaf paths as strings. Use Depth-First Search (DFS) with backtracking.
Start Trying This Question Simulation
Practice answering orally or with text to get instant AI feedback.