Search
⌘K
Get Premium
Leetcode 823. Binary Trees With Factors
Given unique integers >1 (n ≤ 1000), count binary trees (values may be reused) where every non-leaf node equals the product of its children; compute for each value the number of trees rooted at it using DP by summing contributions from factor pairs present in the array, with the result modulo 1e9+7.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.