Find non-duplicate values in an Array

Problem Statement

Given an Array, return the elements that are present exactly once in the array.

You need to write a method called non_duplicated_values to accomplish this task.

Example: Given [1,2,2,3,3,4,5], the method should return [1,4,5]


You can use the method Array#count to count the frequency of any element in the given array

[9,3,4,9,5].count(9) will return the value 2.

You might also want to use Array#find_all, more information can be found here

Output Window

Reading list for this problem

Congratulations, guest!

% of the book completed