Linked list implementation of binary heap insertion
It's always worth tidying up indentation and removing random blank lines (e.g. after {).



Naming: in C# it's conventional that method names are in UpperCamelCase, but even if you choose not to follow the convention it's important to be consistent. Here Heapify follows the convention but insert doesn't.

The name Heapify usually refers to taking an unstructured array of data and structuring it as a heap in linear time. The method implemented here should probably have a name like UpHeap.



It's not clear how insert is supposed to be used. Is it called passing the root of the tree? And where does count come from? It seems to me that BinaryHeap should be BinaryHeapNode and should be a private inner class of a public BinaryHeap which exposes public void Insert(int value).




        int parent = (count - 1)/2;



What does this represent? Elsewhere parent is a BinaryHeap, and it's obvious what it means, but as far as I can guess this variable is actually the size of the right subtree.




            if (((parent == 0) &amp;&amp; (node.left == null)) || (parent % 2 == 1))



Why? I need some comments somewhere in the code to say how the tree is structured. This looks like an attempt to keep it balanced, but I'm not convinced that it works. (I suspect it should check the parity of count rather than parent). Maybe if I knew precisely what it was trying to do I could be convinced.



I don't understand the necessity of all those asserts, but IMO it would be cleaner to remove the duplication by pulling them out of the cases as

            if (node.left != null)
            {
                Debug.Assert(node.data &lt; node.left.data);
            }
            if (node.right != null)
            {
                Debug.Assert(node.data &lt; node.right.data);
            }


or

            Debug.Assert(node.left == null || node.data &lt; node.left.data);
            Debug.Assert(node.right == null || node.data &lt; node.right.data);




The recursive insert calls Heapify at each level that it touches. Heapify bubbles up. That means there's unnecessary duplication of work here.



Why is Heapify public?



if (condition)
{
    DoStuff();
}
else
{
    if (otherCondition)
    {
        OtherStuff();
    }
}


creates unnecessary indentation and vertical spacing, both of which make it harder to read the code. Rewrite as

if (condition)
{
    DoStuff();
}
else if (otherCondition)
{
    OtherStuff();
}