how a polynomial such as 6x^6+4x^3-2x+10 can be represnted
by linked list?write an algorithm that reads such an polynomial
Answer Posted / poojithap2
the polynomial contained in the coefficiant&exponant of x
6.0 4.0 -2.0 10.0
....... .....
6 3 1 0
...... ..... ..... ......
---> ---> ------> --->
...... ..... ..... .......
alg:
if empty list
if polynomial=NULL
then
when('zero polynamial')
return
[traverse list]
reepeat while polynomial!=NULL
set result=derivative of polynomial
write result
set polynomial=next node of polynomial
end loop
return
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
where do you use double linked list?
What is a string array?
What is a matrix? Explain its uses with an example
Design a datastructure to represent the movement of a knight on a chess board
What is the purpose of sorting algorithms?
Explain the term recursive case?
What is peek in stack?
What are the advantage of collection classes over arrays?
Which is the parent class of hashmap class?
What is the time complexity of arraylist and linked list?
What is a subtree?
What is the advantage of circular linked list?
Tell me why might quick sort might be better than merge sort?
Are duplicates allowed in hashmap?
What is an array vs list?