1 Replies - 2988 Views - Last Post: 30 January 2012 - 08:16 PM

#1 nacholibre  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 76
  • Joined: 19-September 09

Scheme - Heap

Posted 30 January 2012 - 12:21 PM

Hello, Can anyone help me understand/explain how a min heap is implemented using scheme?
The documentation on Racket at http://docs.racket-l...aps.html?q=heap
describes it but it is not showing how a heap is made from a list or from numbers.
I Need example usage.
Appreciate the help!
Is This A Good Question/Topic? 0
  • +

Replies To: Scheme - Heap

#2 sepp2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2112
  • View blog
  • Posts: 3,224
  • Joined: 21-June 11

Re: Scheme - Heap

Posted 30 January 2012 - 08:16 PM

You can create an empty heap using create-heap and then add the contents of your list using heap-add-all!.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1