You need to sign in or sign up before continuing.×
6 kyu

Northwest and Southeast corners

68 of 148aweleshetu
Description
Loading description...
Mathematics
Fundamentals
  • Please sign in or sign up to leave a comment.
  • saudiGuy Avatar

    python new test framework is required. updated in this fork

    • Just4FunCoder Avatar

      Forked & Approved

      Honor points go to t̷h̴e̵ v̸̤̠͎͕͇͈̼͋̂͝ò̸̺̻̩̤̘̻̅̎͂̈́͆̄͆̃̔̀͜͝ị̷̍̎̓͠͝d̴̢̨̛̯̤̥͉̥̠͍̋̌̄̉͐͜ͅ

      Suggestion marked resolved by Just4FunCoder 11 days ago
  • FArekkusu Avatar

    The user can modify the input.

  • B1ts Avatar

    The description is still difficult to understand. I thought the idea was to find the farthest points from the center by calculating distances, but it's much simpler.

  • anter69 Avatar

    Python example test case, random tests and description fixed.

  • ChristianECooper Avatar

    The Python example test is not valid.

  • wthit56 Avatar

    Nice idea. Fairly simple.

    I'd recommend expanding on your description, however.

    • Instead of saying "visualise the points on a 2D plane," visualise it for us. Show an image or some text/code based examples.
    • You refer to latitude and longitude, but that implies there may be some weird maths regarding the sperical coordinate system. You could simply say you're using a regular 2D map (like a streetmap), and we have to find the corners.
    • It seems your tests expect +vertical means up, -vertical means down, +horizontal means left, and -horizontal means right. Is that correct? I'm pretty sure anyone familiar with computer screen coordinates, and graphs, and so on would expect the opposite. If this is correct, you should explain this in the description also.
  • nem91 Avatar

    I think the tests should be fixed so that they don't throw sytax errors. The goal should be writing the code, and not fixing the tests.

  • JohanWiltink Avatar

    Your testing is vulnerable to input modification (see here).

    You should give user a copy of the input array he can clobber all he wants, or call the reference solution before calling the user solution with the input.

    • docgunthrop Avatar

      Nice catch, though it seems more an issue than a suggestion. This should've been fixed before the kata got approved.

    • aweleshetu Avatar

      TBH, I never thought this kata would get approved. Given it's initial bad rating. But Johan's suggestion is now implemented, which invalidates the cheat solution provided. so ThAnKs Johan :)

      Suggestion marked resolved by aweleshetu 7 years ago
    • JohanWiltink Avatar

      This comment has been hidden.

    • docgunthrop Avatar

      If it makes any difference, I do appreciate your attention to detail when reviewing katas. I have no qualms about having legitimate criticisms directed my way regarding my code, so if you see a bug with any katas that I publish, please do raise an issue.

  • JohanWiltink Avatar

    I fixed the example test - it was missing a ). (That can't be tested from the kata editor page, only from the trainer - it's easy to overlook. And with all the nested round, square, angle and squiggly brackets it's all too easy to get one wrong.)

    Your reference solution has a potential bug - if any quadrant is not in the input coordinates some compass direction variable will be [] and some coordinate of the final answer will be undefined.

    And the correct spelling of cornor would be corner. But I did not dare fix that, for fear of messing up the whole kata. Wouldn't want that; it is functionally correct as it is.

  • ZozoFouchtra Avatar

    This comment has been hidden.