static void Main(string[] args) { PolyNode p1 = new PolyNode(1, 1, null), p2 = new PolyNode(1, 0, null); Console.WriteLine(AddPoly(p1, p2)); }
public PolyNode(int x = 0, int y = 0, PolyNode next = null) { this.coefficient = x; this.power = y; this.next = next; }