473,385 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Link two lists

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


Nov 13 '05 #1
3 1209
Perpetual Snow wrote:
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
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

Nov 13 '05 #2

"Perpetual Snow" <pi******@hotmail.com> wrote in message
news:3f***********************@news.free.fr...

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.
Nov 13 '05 #3
Perpetual Snow wrote:
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

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Stewart Midwinter | last post by:
I would like to link the contents of three OptionMenu lists. When I select an item from the first list (call it continents), the contents of the 2nd list (call it countries) would update. And in...
36
by: Peter Brause | last post by:
Hello, my stylesheet shows different colors for visited, active and hovered links. It works fine in IE 6, but in Opera 7 the color for the active link (red background) is never shown. How to...
6
by: Ash Lux | last post by:
Does the C++ vector template class use pointer-based link lists? Could I get a link explaining how it works, regardless of what it uses? Thank You, Ash Lux
11
by: Neo | last post by:
Hi Frns, Could U plz. suggest me how can i reverse a link list (without recursion)??? here is my code (incomplete): #include<stdio.h>
16
by: Shwetabh | last post by:
Hi, This is a question asked to me in an interview. I haven't been able to figure out an answer for it. Please try to see what can be done about the following problem. /* I have been given two...
8
by: sudhirlko2001 | last post by:
How to swap two nodes of doubly Linklist
8
by: simon | last post by:
On code behind file: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then Dim ctrl As New LinkButton ctrl.ID =...
9
by: incredible | last post by:
how to sort link list of string
7
by: D.M. Procida | last post by:
<http://www.w3.org/QA/Tips/noClickHeresays: When calling the user to action, use brief but meaningful link text that: * provides some information when read out of context * explains...
36
by: pereges | last post by:
Hi, I am wondering which of the two data structures (link list or array) would be better in my situation. I have to create a list of rays for my ray tracing program. the data structure of ray...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.