addFirst(T x)
addLast(T x)
getFirst()
getLast()
removeFirst()
removeLast()
size()
contains(T x)
x
.add(T x, int pos)
remove(T x)
LinkedList
class so you don't have to implement it yourself! Read up on the official docs to learn more about the specific methods and behaviors provided.