Discussion:
0x^0
(too old to reply)
Mohammad Memarian
2004-02-21 01:48:31 UTC
Permalink
Hi,
Are we considering 0x^0 as head=null and tail= null or should it be a
special case where head= new Element (0,0)?

Thanks,
Mohammad
Igor Ivkovic
2004-02-29 23:43:42 UTC
Permalink
Post by Mohammad Memarian
Are we considering 0x^0 as head=null and tail= null or should it be a
special case where head= new Element (0,0)?
As stated in your P3 Specifications, an empty list corresponds to the zero
polynomial.

The implementation method of this requirement is up to you. As an example,
the LinkedList class in your text in method isEmpty uses "return head ==
null" to check if the list is empty.

Igor
Post by Mohammad Memarian
Thanks,
Mohammad
Loading...