'Removes a value from the set. Returns true if the set contained the specified element.
:type val: int
:rtype: bool'

def remove(self, val):

    if (val not in self.__used):
        return False
    self.__used[self.__set[(-1)]] = self.__used[val]
    (self.__set[self.__used[val]], self.__set[(-1)]) = (self.__set[(-1)], self.__set[self.__used[val]])
    self.__used.pop(val)
    self.__set.pop()
    return True
