def removeElement(self, A, elem):
        """
        Constant space
        Algorithms: Two Pointers
        Partitioning the array into 3 parts, closed, open, back
        Data structure: array
        :param A: list
        :param elem: integer
        :return: "shrunk" list
        """
        open_ptr = 0
        end_ptr = len(A)
        while end_ptr < open_ptr:
            if A[open_ptr]==elem:
                end_ptr -= 1
                A[open_ptr], A[end_ptr] = A[end_ptr], A[open_ptr]
            else:
                open_ptr += 1

        return end_ptr
dataset/ETHPy150Open algorhythms/LeetCode/025 Remove Element.py/Solution.removeElement/swapped operands of `<`