I'm reading Fibonacci Heap and need code to know more clearer. I have programming some of path of fibonacci heap but some path I still cannot programming. So, who can help me please :)

Recommended Answers

All 3 Replies

try this:

procedure Fibonacci(ListBox1: TListBox; Limit: Integer);
var
  x,y,fbi,i:integer;
begin
  listbox1.clear;
  x:=0;
  y:=1;
  listbox1.Items.add(inttostr(x));
  listbox1.items.add(inttostr(y));
  for i:=2 to Limit-1 do
  begin
    fbi:=x+y;
    listbox1.Items.add(inttostr(fbi));
    x:=y;
    y:=fbi;
  end;
end;

oh, you say right, above poster is deal with fibonacci Numbers, but thank for all of yours help, now, I can code it by myself :( not very complicate, I think :) Bbut funny, the only complicate problem I meet is deal with "singular doubled linked list".
Now, I met another problem is... prove it :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.