Interview Question: Recursive Tower

Sample Question #282 (programming – algorithms)

So you want to be a quant, which means you’re smart. You must have heard of the Tower of Hanoi problem, right? Now, can you describe to me how you would write a C++ or Java program to solve the problem, with 3 columns and 3 discs, recursively?

This entry was posted in Sample Qs. Bookmark the permalink.

One Response to Interview Question: Recursive Tower

  1. Brett says:

    First, note how the interviewer is asking you to describe the recursive solution, not to write actual code. Of course, given he or she mentions C++ and Java, he or she is looking for an OOP touch to the solution.
    Check the Wikipedia page for the recursive approach to this problem.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s