The Towers of Hanoi problem is an essential one in my opinion that should be tried in every language track.
Maybe for someone who is already a programmer of another language, it might not be interesting, but for those who are learning programming for the first time, I think it’s a very nice one to get started with recursion.
While I agree that Towers of Hanoi is a great exercise - especially for looking at recursive vs non recursive problem solving (and we have it on our practice exercise list for Python at some point down the line) I do want to add/remind that Exercism is not really designed for those learning programming for the first time.
Yes, I thought about if after I came across the mutable parameter issue. But still, it’s not needed that the array is passed along to the recursive calls, although I can see some trying to do so.
Or maybe a list of all the moves. The testing in that case is fairly easy as it could just simulate the moves and check if it gets to the final desired position.
For 3 towers (1 full, 2 empty) this is too easy: the answer is always 2**disks - 1 (for moving the entire tower).
Maybe given a starting position and/or a desired end state? This riks making the task too difficult, if the point of the exercise is illustrating recursion. (I haven’t thought too hard on it.)
Well, yes, once the concept is understood getting to the initial state of all in one tower is not difficult. But I’m not sure how to assure the most efficient set of steps in that case.
Also, the description of the starting towers should be exhaustive because the relative size of the discs matter.