Build your own singly linked list class, MyLinkedList, without using an array to hold the values. Indexes are 0-based.
get(index) returns the value at index, or -1 if the index is invalidaddAtHead(val) and addAtTail(val) add a node at the front or the backaddAtIndex(index, val) inserts before the node currently at index. If index equals the length, append; if it is greater than the length, do nothingdeleteAtIndex(index) removes the node at index if the index is valid, otherwise does nothingtoArray() is provided in the starter for the tests, and a dummy node makes the head case disappear