Because we have a singly linked list, we only have to worry about me and my next pointer. However, if we had a doubly linked list, we would need to worry about our forward and back pointer. So I believe, if we were editing node i in a doubly linked list, we would need to lock node i-1, i and i+1, hence making it hand-over-hand-over-hand :)
Because we have a singly linked list, we only have to worry about me and my next pointer. However, if we had a doubly linked list, we would need to worry about our forward and back pointer. So I believe, if we were editing node i in a doubly linked list, we would need to lock node i-1, i and i+1, hence making it hand-over-hand-over-hand :)