Given a [!scala]List[Int][/!][!java|python]recursive list[/!], return true if any two elements of the
list are different (ie, if no element appears more than once in the list).
The simplest solution is in O(n²), meaning that it runs in quadratic time.
You will probably have to define one extra function for that.
Another much more complex solution runs in O(n log(n)).