Delete a node in singly link list

后端 未结 3 1626
臣服心动
臣服心动 2021-02-03 12:21

How to delete a node in a singly link list with only one pointer pointing to node to be deleted?

[Start and end pointers are not known, the available information is poin

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-03 12:48

    The only sensible and safe option under such restrictions is to mark the node deleted without actually unlinking it, deferring that to a later time.

提交回复
热议问题