题解 | #HJ48 从单向链表中删除指定值的节点#
从单向链表中删除指定值的节点
http://www.nowcoder.com/practice/f96cd47e812842269058d483a11ced4f
python3
while True: try: n,head,*tail,rm = input().split() res = [head] for i,j in zip(tail[1::2],tail[::2]): if i in res: res.insert(res.index(i)+1,j) res.remove(rm) print(' '.join(res)) except: break