insert

fun insert(value: T, afterNode: Node<T>): Node<T>

Insert a value after a node Time complexity O(1)

Return

Node the new node

Parameters

value

T

afterNode

Node