[Bonfire] No repeats please

Hey Guys, I can not see the problem here. Can you help me?

The problem is described at: https://www.freecodecamp.com/challenges/no-repeats-please

So, my heap generator is not generating the things like i want :frowning:

Any thought?

if( i % 2 === 0 )
  swap(i, n-1, arr);
else
  swap(0, n-1, arr);

It should be if(n % 2 === 0)

1 Like