JavaScript is required for SkillAI Hub to work properly. Please enable JavaScript and refresh the page.
Coding Challenge · BEGINNER
Given the root of a binary tree, return all root-to-leaf paths in the tree. Each path should be represented as a string of node values separated by '-'. A leaf is a node with no children.