An element in an array is dominant if it is greater than all elements to its right. You will be given an array and your task will be to return a list of all dominant elements. For example:
```Haskell
solve([1,21,4,7,5]) = [21,7,5] because 21, 7 and 5 are greater than elments to their right. 
solve([5,4,3,2,1]) = [5,4,3,2,1]
Notice that the last element is always included.
```
More examples in the test cases.
Good luck!
def solve(arr):
    a = set()
    for x in range(len(arr)):
        if arr != []:
            a.add(max(arr))
            arr = arr[(arr.index(max(arr)))+1:]

    return sorted(list(a), reverse=True)
def solve(arr):
    a = set()
    for x in range(len(arr)):
        if arr != []:
            a.add(max(arr))
            arr = arr[(arr.index(max(arr)))+1:]

    return sorted(list(a), reverse=True)