I have some FIFO calculations to be followed so I am using singly-linked-list When I am trying to insert data at specific location using insertAt(index,data) method it just does not work.
var LinkedList = require('singly-linked-list')
var testlist = new LinkedList();
testlist.insertAt(1,'abc');
Output
{
head: null,
tail: null,
size: 0,
iterator:
{
list: [Circular],
currentNode: null
}
}
Please suggest me any fix or alternative for this.