```
class Solution:
# @param A a list of integers
# @return nothing, sort in place
# 11:37
def sortColors(self, A):
i, j, n = 0, 0, len(A) - 1
while j <= n:
if A[j] < 1:
A[i], A[j] = A[j], A[i]
i += 1
j += 1
elif A[j] > 1:
A[j], A[n] = A[n], A[j]
n -= 1
else:
j += 1
```