Skip to content

Glossary: Coding Interviews

Slice copy

Also written: path[:], slice

`path[:]` makes a new list with the same items. Backtracking saves it instead of `path`, because `path` is the one list that keeps changing and would end up empty.

Where the book teaches it

Related terms

PathBacktracking