Repositories (1)
leetcode-rust
1 snippets stored for this repo
// 参考了这里:
// https://leetcode.com/problems/merge-two-sorted-lists/discuss/212315/Rust-solution-%22why-it's-so-damn-hard-to-implement%22
impl Solution {
pub fn merge_two_lists(l1: Option<Box<ListNode>>, l2: Option<Box<ListNode>>)
-> Option<Box<ListNode>> {
match (l1, l2) {
(Some(v1), None) => Some(v1),