Ad
  • Custom User Avatar

    Image linked in description is 404ing.

  • Custom User Avatar

    oh, btw: the random tests are vulnerable to input mutation (do you know what I mean?)

  • Custom User Avatar

    Hi,

    Sorry to say, but the specifications of the problem are really bad, for now:

    • the description is out of synch with the implementation (still talking about a "space" between the coords => result as string while it's tuples)
    • rounding isn't specified (and as pointed below, is a bad idea anyway)
    • the picture is misleading: it suggests that moore neighboring is used for the moves, while diagonal steps have the same length as vertical or horizontal ones, meaning sqrt is involved. Note: I finally saw the note at the end... This is not to put as a note this is plain specificiation! (same for the next bullet point)
    • the description makes it very hard to find out what is the expected task. Like VERY hard...
    • the input isn't described properly: some ambiguity still stands about the order the info is given: (direction,number of steps) or the opposite
    • the description shouldn't start with the picture without explanations: this will let the user make their own assumptions about what te task is, and as pointed above, they'll curently deduce wrong

    on the implementation side:

    • get rid of the input validation: it's boring, and the returned value in that case is bad. If those cases should be handled, there are mainly 2 acceptable ways to do so:
      1. an error is raised
      2. or the output keeps the original type, but returns an impossible value. Which cannot be done here => back to point one.
    • if invalid directions are to be tested in the random tests, they have to be mixed (like, randomly) with the valid inputs => you need to merge the two kind of batches of tests

    Cheers

  • Custom User Avatar

    Don't ask for rounded results, use approximate equality instead

  • Custom User Avatar

    Description should be language-agnostic