Retired

master_pizza_slicer (retired)

Description
Loading description...
Geometry
Puzzles
Mathematics
  • Please sign in or sign up to leave a comment.
  • DaringSteel Avatar

    Like a few other kata I've seen, this is as much a math problem as a coding one. Unlike those, the math problem here is complicated and hard - the square pizza algorithm requires factoring n, which gets much harder as n increases. In combination with the large test numbers and the runtime limit, it becomes a "how many optimization tricks do you know" problem more than a math problem.

    As-is, this is more difficult than I think it really needs to be. Depending on the difficulty level you're aiming for, I would recommend either:

    • Lower the maximum n for test cases to something slightly less absurd, so that less optimized solutions can get past the runtime limit (low difficulty - ~7 kyu).
    • Keep the high n (higher difficulty - ~5 kyu): You may want to reflavor it as a non-pizza-related geometry problem, so us geometry nerds notice it (and to avoid the issue of crusts on square pizzas).

    Additonal suggestions:

    • Instead of having a fixed scenario of 1 circular & 1 square pizza, consider adding an input variable to indicate what kind of pizzas are involved (could be a string "circle" or "square", a list or other type encoding multiple pizzas, etc.). This would require the same algorithms to solve (we would still need to figure out how to evenly divide circular / square pizzas), but would be more flexible and therefore interesting.
  • Voile Avatar

    Random test inputs should be generated on the fly, not a bunch of already determined numbers.

  • Voile Avatar

    Instruction is very under-specified. How are the numbers come up? How are the cuts made? Are we allowed to make a cut from edges formed by previous cuts?

    Without these actual explanations (dumping examples without context isn't explanation), the kata is more of a guesswork than anything.

    • daveaneo Avatar

      Thanks for the feedback. As I understand it, there is only one way to cut the pizzas to make them have equal slices. If you have examples where there are multiple ways to create equal slices, please let me know, and I will try to add more explanation to parse those out. I have updated my instructions to avoid any clever pizza cutting, if that is what you had in mind. If it's still unclear, please let me know.

    • daveaneo Avatar

      Instructions updated.

      Issue marked resolved by daveaneo 5 years ago