823. Binary Trees With Factors
Medium
Input: arr = [2,4]
Output:
3
Explanation:
We can make these trees: [2], [4], [4, 2, 2]Input: arr = [2,4,5,10]
Output:
7
Explanation:
We can make these trees: [2], [4], [5], [10], [4, 2, 2], [10, 2, 5], [10, 5, 2].Last updated