In [432]: s = Solution(); print s.permute([1, 2])
----------------BEGIN------------------
nums = [1, 2]
i = 0
nums[:0] = [] + nums[1:] = [2]
path = [] + nums[0] = 1
res = []
----------------BEGIN------------------
nums = [2]
i = 0
nums[:0] = [] + nums[1:] = []
path = [1] + nums[0] = 2
res = []
----------------BEGIN------------------
nums = []
res append = [[1, 2]]
----------------END-----------------
----------------END-----------------
i = 1
nums[:1] = [1] + nums[2:] = []
path = [] + nums[1] = 2
res = [[1, 2]]
----------------BEGIN------------------
nums = [1]
i = 0
nums[:0] = [] + nums[1:] = []
path = [2] + nums[0] = 1
res = [[1, 2]]
----------------BEGIN------------------
nums = []
res append = [[1, 2], [2, 1]]
----------------END-----------------
----------------END-----------------
[[1, 2], [2, 1]]