Array element is {1,2,3,4,5,6,7} .
The number of all possible permutations in these elements = 7! .
Since, we have to satisfy min heap property, always root element is smallest among all the elements .
So, "1" should be root node. Remaining element is {2,3,4,5,6,7} .
Therefore, there are 3 elements out of 6 elements going to left subtree in 6C3 ways and remaining going to right subtree. Suppose, {2,4,5} going to left subtree and since, minimum element is 2 so, "2" should be root of left subtree. There are 2 remaining elements {4,5} being children of "2" in 2! ways [Either "4" would be left child of "2" and "5" would be right child of "2" Or "4" would be right child of "2" and "5" would be left child of "2"].
So, remaining elements {3,6,7} going to right subtree in 3C3 ways. Since, Minimum element is 3, so "3" should be root of right subtree. There are 2 remaining elements {6,7} being children of "3" in 2! ways.
So, probability = (6C3 x 2! x 3C3 x 2! ) / 7!
= 1/63 = 0.016