Leetcode-823: Binary Trees With Factors
Question

Ex 3: as Binary Tree view:

Code:
Suppose Given array:
[2, 4, 10,100,3,18,144,864000,5,6]
Explanation:
Data structures used :
Array (input)
Map: To store the factors as keys, count as values for reference (can say memoization)
Loops:
1 nested loop( i * j) to iterate and store all the factors into a hash map.
Tip: Recommended to dry run this program once, so you can see the key values inserted in the hash map.
Thanks for reading and claps