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
Program to remove duplicate elements in an array.
Explain what are the major data structures used in the hierarchical data model?
What is time complexity of bubble sort?
Define an algorithm. What are the properties of an algorithm? What are the types of algorithms?
Define a set?
How do you sort a map by key?
Is radix sort stable?
What is binary search in data structure?
How would you swap the Kth node from beginning with Kth node from end in a Linked List.
Can we insert null in hashset?
State the merits of linear representation of binary trees?
Differentiate between an array and an arraylist.
If we add enum constants to a sorted collection ( treemap , treeset ), what will be the order in which they will be maintained?
What do you mean by double hashing?
What is range search?