Hackerrank - Beautiful Pairs Solution
You are given two arrays, and , both containing integers.
A pair of indices is beautiful if the element of array is equal to the element of array . In other words, pair is beautiful if and only if . A set containing beautiful pairs is called a beautiful set.
A beautiful set