# Tag Info

### Runtime complexity of permutation function

Consider this piece of code: for i in range(len(nums)): dfs(nums[:i]+nums[i+1:], curr+[nums[i]], res) Note that ...
• 791
I'm not sure what the problem is, but I will still try to answer. The predecessor of $v$ in a path from $u$ to $v$ is the last vertex seen before $v$. Since there exists a path from $u$ to $v$ then, ...