Rust | Linear time and no extra space (O(n + m) time and O(1) space)
\nuse std::mem;\n\nimpl Solution {\n    pub fn merge_in_between(\n        list1: Option<Box<ListNode>>, \n        a: i32, \n        b: i32,\n        mut list2: 
```\nuse std::mem;\n\nimpl Solution {\n    pub fn merge_in_between(\n        list1: Option<Box<ListNode>>, \n        a: i32, \n        b: i32,\n        mut list2: Option<Box<ListNode>>,\n    ) -> Option<Box<ListNode>> {\n        let mut head = list1.unwrap();\n        \n        let mut current = head.as_mut();\n        for _ in 0..(a - 1) {\n            current = current.next.as_mut().unwrap();\n        }\n\t\t\n        mem::swap(&mut current.next, &mut list2);\n        \n        while current.next.is_some() {\n            current = current.next.as_mut().unwrap();\n        }\n\n        for _ in 0..(b - a + 1) {\n            list2 = list2.unwrap().next;\n        }\n        current.next = list2;\n        \n        return Some(head);\n    }\n}\n```\nYou can see more Leetcode solutions writen in Rust on: https://github.com/garciparedes/leetcode
['Linked List', 'Rust']