5 kyu

The Solar System - Planets on the Move

57 of 58shreedave
Description
Loading description...
Lists
View
AllIssues3QuestionsSuggestions1Show Resolved
  • Please sign in or sign up to leave a comment.
  • metatable Avatar
  • Blind4Basics Avatar

    Hi,

    Missing fixed/sample test: what is the expected value for this?

    • earth> venus <<mercury -> I suppose it's ["mercury"]?
    • same the other way around (kinda)
    • jupiter> asteroid earth> <mercury <saturn -> jupiter saturn
    • shreedave Avatar
      • ["Earth>", "Venus", "<<Mercury"] should return [] because "Earth" smashes "Venus", "Mercury" smashes "Earth" and then goes out of orbit.
      • ["Jupiter>", "Asteroid", "Earth>", "<Mercury", "<Saturn"] should return ["Jupiter", "Saturn"], do you want me to add it in the fixed tests?
    • Blind4Basics Avatar

      do you want me to add it in the fixed tests?

      Yes, that's why I opened this as an issue. But wait, because those two outputs are logically inconsistent, or the specs arean't clear:

      If the first ends up empty, this means the original positions actually do not matter, otherwise, mercury would stay inside the solar system:

        Keeping original positionning:
        E> V  M
        _  E  M
        M  _  _
        => M is still inside the solar system
        
      

      If M actually goes out, there is no rule justifying/explaining it, afaik.

      In any case, I really think the way the example is explained should be changed, using something like my example above, to make clear what the reasonning is.

    • shreedave Avatar

      I'm adding it as another example.

    • shreedave Avatar

      I added the new example (with some more things in it but taking care of the scenario) and added it in the fixed tests and the sample tests.

      Issue marked resolved by shreedave 17 days ago
  • shreedave Avatar

    Awaiting approval, assessed ranks

  • tobeannouncd Avatar

    This comment has been hidden.

  • fenring76 Avatar

    Spec solution appears incorrect:

    Input: ['Blackhole', 'Jupiter>', 'Uranus>>>>', 'Asteroid>', '<<<Earth', 'Venus>>', '<Asteroid', '<<<<Mercury', '<<<<Asteroid', 'Saturn>>>>'] Output: ['Blackhole', 'Jupiter'] should equal ['Blackhole', 'Jupiter', 'Saturn']

    If I'm understanding correctly, Saturn should have left the system.

    • anter69 Avatar

      Similar issues here:

      input:
      ['Earth>>>>', '<<Saturn', 'Venus>', 'Mars>>>>', '<<<<Asteroid', '<<<Mercury', 'Blackhole', '<<<Uranus']
      output: 
      ['Blackhole'] should equal ['Mercury', 'Blackhole']
      

      Mercury should have gone out of orbit


      input:
      ['Neptune', '<<<<Asteroid', '<<<<Saturn', 'Mars>', 'Venus>', '<Asteroid', 'Mercury>>', '<Asteroid', 'Uranus>']
      output: 
      [] should equal ['Uranus']
      

      Uranus should have gone out of orbit

    • shreedave Avatar

      All of these, (Saturn, Mercury and Uranus), were being ignored, but I fixed it.

      Issue marked resolved by shreedave 22 days ago
  • dfhwze Avatar

    The survivors, ["Uranus", "Blackhole"] is what you have to return.

    This is quite the co(s)mic pair.