Typescript Add Function In Arraylist Vs Linkedlist