Managing a heap using an array.

This is a discussion on Managing a heap using an array. within the C Programming forums, part of the General Programming Boards category; Can anyone suggest any ideas to write functions to manage a heap using an existing array. Any ideas, any info ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    6

    Managing a heap using an array.

    Can anyone suggest any ideas to write functions to manage a heap using an existing array.
    Any ideas, any info about what exactly heap is and how is works?

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,669
    You get memory off the heap using malloc().

    gg

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Re: Managing a heap using an array.

    Originally posted by rahuls
    Can anyone suggest any ideas to write functions to manage a heap using an existing array.
    Any ideas, any info about what exactly heap is and how is works?
    That would be too much to explain in a single post. Search google.
    If I remember correctly, a heap is a kind of a binary tree where the children nodes have larger key values than its parent.
    Last edited by Magos; 03-20-2003 at 01:19 PM.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,669
    Oh, that kind of heap, LOL.
    You will want to search for "binary heap". Or get a good algorithms book.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2d array question
    By gmanUK in forum C Programming
    Replies: 2
    Last Post: 04-21-2006, 12:20 PM
  2. question about multidimensional arrays
    By richdb in forum C Programming
    Replies: 22
    Last Post: 02-26-2006, 08:51 AM
  3. Template Array Class
    By hpy_gilmore8 in forum C++ Programming
    Replies: 15
    Last Post: 04-11-2004, 11:15 PM
  4. Type and nontype parameters w/overloading
    By Mr_LJ in forum C++ Programming
    Replies: 3
    Last Post: 01-02-2004, 12:01 AM
  5. Help with an Array
    By omalleys in forum C Programming
    Replies: 1
    Last Post: 07-01-2002, 08:31 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21