0

I was trying to solve this question.
I tried to come up with the following approach.
First sort all the numbers then iterate from large to small while doing these steps, Suppose the number we are currently iterating is \$num\$.
Find how many factors of the number \$num\$ are there in the array.
S...