shrink the vec in remove vec
This commit is contained in:
parent
984c680bad
commit
a52a93436f
1 changed files with 1 additions and 0 deletions
|
@ -36,6 +36,7 @@ impl Solution {
|
|||
v.push(node.val);
|
||||
list = node.next;
|
||||
}
|
||||
v.shrink_to_fit();
|
||||
v
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue