Given an array of unique integers arr, you can construct binary trees using these integers as node values. Each integer in arr may be used any number of times.
A binary tree is considered valid if for every non leaf node, the value of the node is equal to the product of the values of its left and right children.
Return the number of distinct binary trees that can be created. Since the answer may be very large, return it modulo
Constraints:
arr.length
arr[i]
All the values of arr are unique.
Given an array of unique integers arr, you can construct binary trees using these integers as node values. Each integer in arr may be used any number of times.
A binary tree is considered valid if for every non leaf node, the value of the node is equal to the product of the values of its left and right children.
Return the number of distinct binary trees that can be created. Since the answer may be very large, return it modulo
Constraints:
arr.length
arr[i]
All the values of arr are unique.