Good morning! Here's your coding interview problem for today.
This problem was asked by Microsoft.
Write a program to determine how many distinct ways there are to create a max heap from a list of N given integers.
For example, if N = 3, and our integers are [1, 2, 3], there are two ways, shown below.
3 3
/ \ /
1 2 2 1