Solving Binary Tree Paths in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description

Given a binary tree, return all root-to-leaf paths.

Example:

Input:

   1
 /   \
2     3
 \
  5

Output: ["1->2->5", "1->3"]

Explanation: All root-to-leaf paths are: 1->2->5, 1->3

See the full details of the problem Binary Tree Paths at LeetCode

Originally posted at: @github.com/halfrost/LeetCode-Go