Follow

New Code Challenge

Implement a Symmetric Difference where...

{ 1, 2, 5 } △ { 2, 3, 5} △ { 3, 4, 5 } = { 4, 5, 1 }

The result should have no duplicates.

My solution using Enumerable#reduce & a nice twist at the end.

Sign in to participate in the conversation
Ruby.social

A Mastodon instance for Rubyists & friends