https://www.hackerrank.com/contests/codeagon/challenges/ugly-or-beautiful/problem
You are given an array,a of n non-zero positive integers. The array is said to be beautiful if all the following constraints are satisfied:
The array consists of unique elements. The array elements are not sorted in ascending order. All the array elements should have a value between 1 to n inclusive.