javascript-exercises icon indicating copy to clipboard operation
javascript-exercises copied to clipboard

feat(hanoi): create exercise

Open nik-rev opened this issue 1 year ago • 1 comments

Because

I think this exercise should be the last one because in my mind it's the most difficult one.

This PR

  • Adds exercise 20

Issue

Related to #27265

Additional Information

Pull Request Requirements

  • [x] I have thoroughly read and understand The Odin Project Contributing Guide
  • [x] The title of this PR follows the location of change: brief description of change format, e.g. 01_helloWorld: Update test cases
  • [x] The Because section summarizes the reason for this PR
  • [x] The This PR section has a bullet point list describing the changes in this PR
  • [x] If this PR addresses an open issue, it is linked in the Issue section
  • [x] If this PR includes any changes that affect the solution of an exercise, I've also updated the solution in the /solutions folder

nik-rev avatar Mar 24 '24 16:03 nik-rev

Ready for review!

nik-rev avatar May 03 '24 00:05 nik-rev

I've got the other PRs mostly ready to go for the Ruby course, so hopefully we can finally get this work merged soon.

The main thing giving me pause right now is this specific exercise, which I'm not entirely sold on for a couple of reasons:

  1. I think it's quite challenging, and I'm not all that interested in putting learners through the ringer on these questions. They really just need to understand recursion well enough to do DFS type things on their Binary Search Trees. I kind of want to stay away from more challenging problem types.
  2. The problem setup/instructions present a more abstract situation than the other problems, which have a pretty clear and logically straightforward (input -> output) setup. With every other problem we give for these exercises, the answer can be known to the learner just from looking at the input and understanding the (quite basic) transformation we want. This one doesn't work that way. Even if you understand the rules, you can't quickly intuit what hanoi(4) should return. I argue that this makes the problem not great for learning recursion.

Willing to be swayed on some of this though if either of you are really set on keeping it around @mao-sz @nik-rev

JoshDevHub avatar Nov 10 '25 19:11 JoshDevHub

@JoshDevHub I don't have a particularly strong opinion on this; your points make a lot of sense. I'm more than happy to defer to your judgement on this :+1:

mao-sz avatar Nov 10 '25 21:11 mao-sz

Since we've all come to a consensus, let's get rid of this one!

nik-rev avatar Nov 11 '25 10:11 nik-rev