Consider the array containing the following elements:
int a[8] = {5, 3, 1, 9, 8, 2, 4, 7};
Show the step-by-step execution of Heapsort algorithm taking as input the array a. In particular, first show how to create the heap then how to sort the elements. At every iteration, show the heap and the corresponding array.