a linked list question
having a hard time grasping how to work this
i have a polynom linked list and i need to add a Node somewhere in the middle for example the 4th place
the question is how do i run on the linked list
i made this function
public polynom insert (int place , Monom data , polynom tmp)
and i need to get to the fourth place how do i run on it without running over previous nodes
i hope it was clear enough
thanks to all the helpers !
Why don't you take a look at the the LinkedList API : LinkedList
You will find some methods like add(int index, E element) which might help you out.
Hope that helps,
umm yea that's what i need to build
i can't use the made one
...And there is no point in re-inventing the wheel unless you want to make it square this time around. :p
Originally Posted by smacker
I'm guessing it's an assignment.
yea it's an assignment
but i think i figured it out after two weeks of working on it :D