Answers ( 2 )

  1. 2017-01-06 08:01

    This does the job :

    • Sort the array
    • Find 0 and cut the array
    • Substract rotated array to find doubles (=0)
    • remove doubles

    Block Diagram

    Front Panel

  2. 2017-01-07 03:01

    Unless there was a real efficiency need, I'd shoot for simplicity and readability:

    1. Sort the array
    2. Feed it into a for loop with a conditional concatenation terminal
      1. Use a feedback node to get the last value
      2. If this value is >0 and != to the last value, send true to the concatenation terminal.

    You could always AND the >0 and != tests together and wire that directly to the concatenation terminal.

    The output array from the for loop will be what you're looking for.

◀ Go back