Skip to content

Glossary: Data Structures and Algorithms in Java

subList

Also written: view

A view of part of a list that copies nothing (O(1)), so changing it changes the original. Wrap it in `new ArrayList<>(...)` for an independent copy.

Where the book teaches it

Related terms

ArrayList