Link two lists

P

Perpetual Snow

How can I link two linked lists with no memory allocation?
I'm searching for an algorithm which is constant in runtime and space.

Thanks
 
K

Kevin Goodsell

Perpetual said:
How can I link two linked lists with no memory allocation?
I'm searching for an algorithm which is constant in runtime and space.

This group discusses the C language. This is not a C language issue.

-Kevin
 
J

J. J. Farrell

Perpetual Snow said:
How can I link two linked lists with no memory allocation?
I'm searching for an algorithm which is constant in runtime and space.

Trivially, to the extent that almost any attempt to point you
in the right direction would complete this homework assignment
for you in its entirety.

Post a compileable program showing your attempt, and an explanation
of how you've tried to find the problems, and someone will help
you sort out the details.
 
C

Capstar

Perpetual said:
How can I link two linked lists with no memory allocation?
I'm searching for an algorithm which is constant in runtime and space.

Thanks

<OT>
Take a look in "include/linux/list.h" of the linux source. If this is
homework you'll probably won't get that anyway. If not, it's a nice
implementation of a list without memory allocation.
</OT>

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top