Im trying to use heapify to fix the problem in the binary heap caused by decreasing a key, but there seems to be a problem?
Remember that Heapfiy is not a magic “fix-all” method for the binary heap. If you call heapify(i), this fixes the binary heap if the only violation for the binary heap property is that A[i] might be in violation (e.g. bigger when the min is in A[0]) with one of its children. Heapify does not resolve any other problems.