Can anyone tell me the complete algorithm analysis of Tower of Hanoi for n pegs and n disks.I really need it :sad:

Recommended Answers

All 9 Replies

>Can anyone tell me the complete algorithm analysis of Tower of Hanoi
Sure:

#include <iostream>

using namespace std;

int main()
{
  cout<<"I'm too lazy to do my own work\n";
  cout<<"I'm too stupid to realize that nobody will do my work for me\n";
  cout<<"I'll never amount to anything because I'm a cheating slacker"<<endl;
}

I went into Google and typed

algorithm analysis of Tower of Hanoi

and it came right up with a bunch of interesting sites.

or just click on the Gooooogle adds that show up in this thread for a lot of hot deals in and about Hanoi :)

Hey! That's what I said! I wasn't trying to be rude, just helpful!

Google is a wonderful resource for algorithms.

just trying to make people think for themselves Dani... There's way too much "I don't want to think, I just want a canned solution so I won't fail my test" attitude these days.
If those people graduate without writing code they'll become problems for us as colleagues and we'll end up with more work as we'll have to do their work as well leading to unpaid overtime, missed deadlines, etc. etc.

Sorry guys for the confusion. I was actually leaning my comment towards Narue. ;)

Thanks guys , at last i got the solution.

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.