algorithms icon indicating copy to clipboard operation
algorithms copied to clipboard

list.add seems to have a minor mistake

Open Rui-L opened this issue 8 years ago • 2 comments

I think this should be if l.Len() == index { https://github.com/arnauddri/algorithms/blob/master/data-structures/linked-list/linked_list.go#L82

Rui-L avatar Jan 19 '17 14:01 Rui-L

if i.Len() <= index better?

shengzhch avatar Oct 10 '18 03:10 shengzhch

I actually corrected it. here is my pull request https://github.com/arnauddri/algorithms/pull/21

Mohammadjafari80 avatar Feb 04 '21 20:02 Mohammadjafari80