shrink the vec in remove vec

This commit is contained in:
Joe Ardent 2022-12-01 12:45:04 -08:00
parent 984c680bad
commit a52a93436f

View file

@ -36,6 +36,7 @@ impl Solution {
v.push(node.val); v.push(node.val);
list = node.next; list = node.next;
} }
v.shrink_to_fit();
v v
} }
} }