answersLogoWhite

0

How can we represent polynomials using linked lists?

Updated: 8/17/2019
User Avatar

Wiki User

βˆ™ 11y ago

Best Answer

30

User Avatar

Wiki User

βˆ™ 11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can we represent polynomials using linked lists?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is there a c program to multiply two polynomials using linked lists?

yes


How do you solve josephus problem using circular linked list?

The Josephus problem is a problem to locate the place for the last survivour. It shows the power of the circular linked list over the singly linked lists.


How do you Add two polynomial using a link list in c plus plus?

Linked lists are a good way to represent polynomials. The coefficients of each term would be a node in the linked list, with the first node representing X0 and each successive node representing the next higher power of X; X1, X2, etc.. To add two polynomials, you simply add the coefficients of like terms. To add linked lists, you simply add the values of like orders, i.e. you would add the first nodes together, the second terms together, the third terms together, and so on and so forth. You iterate through both polynomials (linked lists) and add the coefficients. You either generate a third linked list or you add the first to the second, as desired. You need to be able to handle list extension, and when you run out of terms on one list, you stop. In C or C++ (or other language supporting self referential structures) you can implement this simply by building a linked list and providing functions to iterate and add. If you have an OO language like C++ or JAVA, you can actually implement a class, creating a new type, polynomial, so that the interface could be as simple as... polynomial a (1, 2, 3, 4, 5); polynomial b (2, 4, 6, 0, 8, 10, 12); a = a+b; // the result would be a (3, 6, 9, 4, 13, 10, 12) Actual implementation is not shown, because that is a large effort, because the question only asked "how", and because we are not really here to do your homework.


Application of linked list?

what are the main applications of double linked list? 1. Applications that have an MRU list (a linked list of file names) 2. The cache in your browser that allows you to hit the BACK button (a linked list of URLs) 3. Undo functionality in Photoshop or Word (a linked list of state) 4. A stack, hash table, and binary tree can be implemented using a doubly linked list. 5. A great way to represent a deck of cards in a game.


What are the disadvantages of a linked list?

Linked lists use more memory than arrays, and finding an element in the list requires scanning the entire list instead of simply using a base pointer and index. As a result, linked lists are not well suited for data with a large number of elements. They are best used for a small number of elements that use a lot of space (relatively speaking).


What is the quick sort program using linked list and recursive methods?

Linked lists are not ideally suited to the quicksort algorithm because linked lists do not provide constant-time random access. The most efficient means of implementing quicksort upon a list is to move all the elements to an array, sort the array using quicksort, then move the elements back into a list. This increases the complexity by O(n*2), which is costly, but is more than compensated for by the improved efficiency of sorting an array.


How do you make working model of maths on polynomials?

Polynomials are the simplest class of mathematical expressions. The expression is constructed from variables and constants, using only the operations of addition, subtraction, multiplication and non-negative integer exponents.


How linked lsts can be usd to represent long integers?

linked list consists of data nodes, each pointing to the next in the list. An array consists of contiguous chunks memory of predetermined size.Linked lists are quite flexible. They can grow to any size -- up to resource limits -- and each node can be a different size. Memory allocation for a node is done as needed, usually when a new node is added.Linked lists can be circular, or doubly-linked (pointers forward and backward), and new nodes can be inserted anywhere in the chain.The greatest downside to linked lists is sequential access: to find any node in memory, each previous node must be examined and the pointers followed. Linked lists are also more complex to program and manage.Arrays are fixed in size, so resources must be anticipated and consumed in advance. Each element is the same size and must contain the same data type. But access to a particular element is very fast, because its location in memory can be determined mathematically and accessed directly (offset from start of array = subscript * element size).Note that modern languages -- especially OO languages such as C++ and Java -- blur this distinction by providing classes which offer the best of both worlds. Arrays can grow; linked list complexity is hidden from the programmer; hash tables (special arrays, really) allow for rapid indexing of arbitrary data. But under the hood, each complex data type is implemented using primitives such as arrays and linked lists


Consider a linked list with n integers Each node of the list is numbered from 1 to n Develop a program using C language to split this list into 4 lists so that.?

list any six consteations


How do you make sentences using 'strongly linked'?

Obesity has been strongly linked to diabetes.


How can you represent a proportional relationship using an equation?

You cannot represent a proportional relationship using an equation.


Can a linked list implemented using an array be accessed by giving the location?

A linked list implemented with an array defeats the purpose of using a linked list, which is to address the memory allocation problems associated with arrays.