Re: Building a linked list
- From: brianlaca@xxxxxxxxx
- Date: Thu, 20 Sep 2007 04:44:34 -0000
On Sep 19, 5:39 pm, Lew <l...@xxxxxxxxxxxxx> wrote:
Robert wrote:
On Sep 19, 4:13 pm, bribr...@xxxxxxxxx wrote:
Hi everybody, I'm stuck and was hoping someone here could help. I am
implementing a linked list, with a class node,
You are well advised to name this class with an initial upper-case letter.
which has a String object text and a node next as its definition. I'm all set on adding,
deleting, inserting, etc. But for the life of me, I cannot figure out
how to insert the original data to build the list initially. Any help
would be great, and if you need more info just let me know.
Thanks in advance :)
If you're all set on adding that's what you do. Add the nodes one at
a time to build your list. Am I confused here?
They probably want the advice to declare a variable (of, say, type Node) to
point to the start of the LincolnList, and to set it to a new node (of, say,
type Node) as a new item comes into the LL.
Presumably with that advice they'd know what to do with the `next' reference
when the next item comes into the list.
There was a darned good hint on this very problem (could it already be the
start of a new semester?) in a thread on this very problem just a day or two
ago. To the OP: do you know how to search the newsgroup archives?
Also, GIYF.
--
Lew
I do and my apologies for posting prior to searching. Will
extensively search the archives in the future.
.
- Follow-Ups:
- Re: Building a linked list
- From: Lew
- Re: Building a linked list
- From: Lew
- Re: Building a linked list
- References:
- Building a linked list
- From: bribriLA
- Re: Building a linked list
- From: Robert
- Re: Building a linked list
- From: Lew
- Building a linked list
- Prev by Date: Re: Building a linked list
- Next by Date: Re: Building a linked list
- Previous by thread: Re: Building a linked list
- Next by thread: Re: Building a linked list
- Index(es):