diff --git a/C#/Datastructures/Heap/Heap.cs b/C#/Datastructures/Heap/Heap.cs new file mode 100644 index 0000000..9d6738d --- /dev/null +++ b/C#/Datastructures/Heap/Heap.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace C_.Datastructures.Heap +{ + internal class Heap where T:IComparable + { + internal HeapNode? Root { get; set; } + private int Count { get; set; } + + public static Heap Create(){ + return new Heap{ + Root = null, + Count = 0 + }; + } + + public static Heap Create(T value){ + return new Heap{ + Root = HeapNode.Create(value), + Count = 1 + }; + } + } +} \ No newline at end of file