Thread: What is array of LinkedList

  1. #1
    Registered User
    Join Date
    Mar 2006
    Location
    Bangalore, INDIA
    Posts
    43

    What is array of LinkedList

    what is array of linked list, how it is declared and whats the use of it.

    Probably the declaration of array of LinkedList is as below
    Code:
    struct ll
    {
           int i;
           struct ll *next;
    }array[10];
    but whats the use of it......we are using LinkedList for optimization, but again we are getting into STATIC memory allocation....

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Hash table. You can sort through one giant list, or 1/Nth of that.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Mar 2006
    Location
    Bangalore, INDIA
    Posts
    43
    so array of linkedlist is used for Hash Table.....

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    It can be. It doesn't have to be.


    Quzah.
    Hope is the first step on the road to disappointment.

  5. #5
    Registered User
    Join Date
    Mar 2006
    Location
    Bangalore, INDIA
    Posts
    43
    then whats the advantage of using array of linked list....just linked list is more than enough right?

  6. #6
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    What use is a screwdriver? What about a screwdriver that's a bit bigger? I mean, they're both still screwdrivers, right?


    One just gets you drunk faster.


    Quzah.
    Hope is the first step on the road to disappointment.

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    arrays of lists
    lists of lists
    arrays of arrays
    a tree of arrays of lists.

    Use whatever makes sense in managing the data for the problem you're trying to solve.

    Many problems can be solved with different structures, making some aspects of the problem easier, and others harder. Choosing which is experience.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. from 2D array to 1D array
    By cfdprogrammer in forum C Programming
    Replies: 17
    Last Post: 03-24-2009, 10:33 AM
  2. Replies: 12
    Last Post: 10-22-2006, 08:37 PM
  3. [question]Analyzing data in a two-dimensional array
    By burbose in forum C Programming
    Replies: 2
    Last Post: 06-13-2005, 07:31 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM