Problem 823 · Medium

Binary Trees With Factors

Count binary trees whose internal values equal the product of their two children, using values from a distinct list. The visual sorts the values and combines each pair whose product is in the set.

Open the interactive visualisation