Home » questions » Using Linked Lists and STL in C++ to write a code , Who can Help ?
Using Linked Lists and STL in C++ to write a code , Who can Help ?
I want to write the following code in C++ , who can help me or give me some example or pre-written code about this topic ???
you will implement a class template called polynomial using linked lists and instantiate it by int. Each node in the linked list represents a term (such as -7x5) in the polynomial and contains at least the following member variables: the degree(the degree of the term) and coeff (the nonzero coefficient of the term). Note that you should only store nonzero coefficients. This means that if a coefficient goes to zero as a result of any operation, you must make sure that you delete that node.
In addition, you must make sure that the terms in the linked list are arranged in increasing order of their degree. Thus, the linked list corresponding to polynomial q(x) defined above must have nodes in the following order: node 1 representing term -5, node 2 representing the term 6x3, and node 3 representing the term -7x5.

Answers
Arkangyle
On 2006-08-02 13:35:58