• Cracking the coding interview:链表删除

    01/15 chency

英文题目:

Implement an algorithm to delete a node in the middle of a single linked list, given only access to that node.
EXAMPLE
Input: the node ‘c’ from the linked list a->b->c->d->e
Result: nothing is returned, but the new linked list looks like a->b->d->e

译文:

请实现一个算法,使得该算法能够删除单向链表的中间某一结点,算法输入为要删除的结点的指针

举例:

链表:a->b->c->d->e,输入’c’,

输出:更新链表为a->b->d->e

1 收藏


直接登录