using System; using Interfaces; namespace PriorityQueue { public class Node : INode, IComparable> where T : IComparable { public int Id { get; set; } public T Key { get; set; } public Node(int id) => Id = id; public Node(int id, T key) : this(id) => Key = key; public int CompareTo(INode node) => Key.CompareTo(node.Key); } }