473,320 Members | 2,071 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,320 software developers and data experts.

What kind of linked-list generic do they mean?

Hello!

What actually does this sentence mean?
Create a linked-list generic class that enables you to create a chain of
different objects types.

When I create a linked-list generic class for example with the string type.
I do the following.
List<stringmyList = new List<string>();

So what can they mean when they say different objects types.

Does it sounds reasonable that they mean a linked-list of object like this
List<ObjectmyList = new List<Object>();

//Tony
Oct 16 '08 #1
4 3254
On Thu, 16 Oct 2008 11:53:17 -0700, Tony Johansson
<jo*****************@telia.comwrote:
What actually does this sentence mean?
Create a linked-list generic class that enables you to create a chain of
different objects types.
Impossible to say for sure without more context.
When I create a linked-list generic class for example with the string
type.
I do the following.
List<stringmyList = new List<string>();
That's not a linked list.
So what can they mean when they say different objects types.

Does it sounds reasonable that they mean a linked-list of object like
this
List<ObjectmyList = new List<Object>();
No. But perhaps they mean this:

LinkedList<objectmyList = new LinkedList<object>();

Pete
Oct 16 '08 #2
Hello!

I just wonder what advantages does a LinkedList<Thave compared to List<T>
?

So is it possible to say in general when to use LinkedList<T>?

//Tony
"Peter Duniho" <Np*********@nnowslpianmk.comskrev i meddelandet
news:op***************@petes-computer.local...
On Thu, 16 Oct 2008 11:53:17 -0700, Tony Johansson
<jo*****************@telia.comwrote:
>What actually does this sentence mean?
Create a linked-list generic class that enables you to create a chain of
different objects types.

Impossible to say for sure without more context.
>When I create a linked-list generic class for example with the string
type.
I do the following.
List<stringmyList = new List<string>();

That's not a linked list.
>So what can they mean when they say different objects types.

Does it sounds reasonable that they mean a linked-list of object like
this
List<ObjectmyList = new List<Object>();

No. But perhaps they mean this:

LinkedList<objectmyList = new LinkedList<object>();

Pete

Oct 16 '08 #3
On Thu, 16 Oct 2008 13:12:27 -0700, Tony Johansson
<jo*****************@telia.comwrote:
I just wonder what advantages does a LinkedList<Thave compared to
List<T>
The primary advantage is that it's much faster (and simpler) to insert
into or remove an element from a LinkedList<Tthan into a List<T>, except
for operations at the very end of the list. Those operations for a
List<Trequire the entire contents of the data structure after the point
of modification to be copied, whereas for a LinkedList<Tthose operations
can always be completed in constant time, just by modifying a fixed number
of pointers.
So is it possible to say in general when to use LinkedList<T>?
LinkedList<Thas more overhead. So I would only use it when I expect to
spend a lot of time modifying the list in ways other than adding or
removing from the very end. Otherwise, List<Tis probably preferable.

Pete
Oct 16 '08 #4
Tony Johansson wrote:
What actually does this sentence mean?
Create a linked-list generic class that enables you to create a chain of
different objects types.
I think they want you to write your own LinkedList<implementation.

Arne
Oct 16 '08 #5

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

Similar topics

4
by: nib | last post by:
What kind of problems is visual basic best at solving?
0
by: Claudio Grondi | last post by:
Hi, I have just by chance discovered, that Microsoft research works on a kind of programming language called AsmL, and I'm just curious if AsmL, which is using same concept of significant...
39
by: Holly | last post by:
I'm trying to validate my code and I can't figure out what kind of doctype I have. The validator can't tell me anything because it can't move beyond the doctype declaration. ...
5
by: pinballjim | last post by:
Hello everyone, I'm looking for a simple way to create a local copy of a linked table. I've got a database that links about 10 tables from other databases. This works fine on my machine, but I...
2
by: Robert McGregor | last post by:
Hi all, I've got a Front End / Back End database that was working just fine. One day i opened the FE to find that if I tried to open one of the linked tables from the database window, nothing...
1
by: Phil Abrahamsen | last post by:
Access 2002: Example: Master record: ID#, Name Linked records: ID#, Member year If a member for the last 3 years you have 3 linked records withmember year = 2002, 2003, and 2004. I want to...
29
by: A.P. Hofstede | last post by:
Could someone tell me where MS-Access (current and 97?) fit(s) on the RDBMS - ORDBMS - ODBMS spectrum? I gather it's relational, but how does it size up against/follow SQL2/3/4 definitions and how...
2
by: Jill Elaine | last post by:
I am building an Access 2002 frontend with linked tables to an encrypted Paradox 7 database. When I first create these linked tables, I'm asked for the password to the encrypted Paradox database,...
25
by: bubbles | last post by:
Using Access 2003 front-end, with SQL Server 2005 backend. I need to make the front-end application automatically refresh the linked SQL Server tables. New tables will be added dynamically in...
12
by: contactmayankjain | last post by:
Hi, Its said that one should avoid dynamic allocation of memory, as it de- fragment the memory into small chunks and allocation of memory is a costly process in terms of efficiency. So what is...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.