Ad
  • Custom User Avatar
    min-max = I
    

    What a flex!

  • Custom User Avatar

    I mean that is the main purpose of zip, isn't?

  • Custom User Avatar

    My solution is just flat-out embarsassing compared to everyone else's.

  • Custom User Avatar

    I think I have the solution. My local fork accepts your current code and tests.

    It would help if you wrote code and tests, for specifically what you want to do, that currently fails, because I'm losing sight of things a bit, with umpteen possibilities to choose from, some of which already work.

  • Custom User Avatar

    Seems arbitrary. Self-comparison plays a role in symmetry for odd-length arrays. You still have even-length left for your symmetry driving needs

  • Custom User Avatar

    Single-element arrays are treated as a special base case, but for larger odd-length arrays the middle is ignored so that symmetry, not self-comparison, drives the result.

  • Custom User Avatar

    But why arbitrarily let length 1 arrays count but not larger odd length arrays? Wouldnt it make way more sense to treat them the same?

  • Custom User Avatar

    Thanks for pointing that out . I’ve updated the description to remove the ambiguity.

  • Custom User Avatar

    If an element can be a mirror of itself, [42] should return 0, and [1, 2, 3, 4, 5] should return 2.

    If an element can not be a mirror of itself, [42] should return -1, and [1, 2, 3, 4, 5] should return -1.

    This needs to be specified in description.

  • Custom User Avatar

    But arr[2] == arr[5-1-2] == 3

  • Custom User Avatar

    [1,2,3,4,5] has no mirror index because none of its elements equal their reflected partner.

  • Custom User Avatar

    Why does [1,2,3,4,5] have no mirror index but [42] has one?

  • Custom User Avatar

    It may matter that pow is directly imported into JS. Helpers that are called but not imported may have a little more leeway.

    no, that's probably not it

  • Custom User Avatar

    getting

    ReferenceError: rndList3 is not defined
        at Context.<anonymous> (file:///workspace/test.js:22:18)
        at processImmediate (node:internal/timers:464:21)
    

    in the random tests of the sample tests

  • Custom User Avatar

    Please use spoiler flag next time, your post was visible in the homepage.

  • Loading more items...