943,931 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 19419
  • C++ RSS
Nov 19th, 2004
0

Tower Of Hanoi

Expand Post »
Can anyone tell me the complete algorithm analysis of Tower of Hanoi for n pegs and n disks.I really need it
Similar Threads
Reputation Points: 7
Solved Threads: 1
Junior Poster in Training
harshchandra is offline Offline
68 posts
since Nov 2004
Nov 19th, 2004
0

Re: Tower Of Hanoi

>Can anyone tell me the complete algorithm analysis of Tower of Hanoi
Sure:
C++ Syntax (Toggle Plain Text)
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. cout<<"I'm too lazy to do my own work\n";
  8. cout<<"I'm too stupid to realize that nobody will do my work for me\n";
  9. cout<<"I'll never amount to anything because I'm a cheating slacker"<<endl;
  10. }
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Nov 19th, 2004
0

Re: Tower Of Hanoi

wow... i think i found a site for your "analysis"

www.owned.gg
Reputation Points: 10
Solved Threads: 1
Newbie Poster
phr0stbyt3 is offline Offline
16 posts
since Oct 2004
Nov 19th, 2004
0

Re: Tower Of Hanoi

I went into Google and typed

algorithm analysis of Tower of Hanoi

and it came right up with a bunch of interesting sites.
Reputation Points: 36
Solved Threads: 11
Posting Pro in Training
Chainsaw is offline Offline
436 posts
since Jun 2004
Nov 20th, 2004
0

Re: Tower Of Hanoi

or just click on the Gooooogle adds that show up in this thread for a lot of hot deals in and about Hanoi
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Nov 20th, 2004
0

Re: Tower Of Hanoi

Whoa! Let's not be this rude please folks. I did a google search for towers of hanoi and a bunch of informative links came up:

http://www.cut-the-knot.org/recurrence/hanoi.shtml
http://mathforum.org/dr.math/faq/faq.tower.hanoi.html

They should answer your question.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Nov 20th, 2004
0

Re: Tower Of Hanoi

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

Google is a wonderful resource for algorithms.
Reputation Points: 36
Solved Threads: 11
Posting Pro in Training
Chainsaw is offline Offline
436 posts
since Jun 2004
Nov 20th, 2004
0

Re: Tower Of Hanoi

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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Nov 20th, 2004
0

Re: Tower Of Hanoi

Sorry guys for the confusion. I was actually leaning my comment towards Narue.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Nov 20th, 2004
0

Re: Tower Of Hanoi

Thanks guys , at last i got the solution.
Reputation Points: 7
Solved Threads: 1
Junior Poster in Training
harshchandra is offline Offline
68 posts
since Nov 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Need help with recursion and arrays
Next Thread in C++ Forum Timeline: How to be Crash Free





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC