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
1 changed files with 1 additions and 0 deletions

View File

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