how to modify a linked list by using pointers only
I have a linked list of Option<Box<ListNode>>
type, a node of this list contains two properties: value (i32) and next (Option<Box<ListNode>>
). I’ve created a vector of pointers (Vec<&Box<ListNode>>
) with the purpose of serving to modify the original list as showed in the following picture: