Rust cheapest & best
\nimpl Solution {\n    pub fn cal_points(ops: Vec<String>) -> i32 {\n        ops.iter()\n            .fold(vec![], |mut acc, cur| {\n                match cur.a
```\nimpl Solution {\n    pub fn cal_points(ops: Vec<String>) -> i32 {\n        ops.iter()\n            .fold(vec![], |mut acc, cur| {\n                match cur.as_str() {\n                    "+" => acc.push(acc[acc.len() - 1] + acc[acc.len() - 2]),\n                    "D" => acc.push(acc[acc.len() - 1] * 2),\n                    "C" => {\n                        acc.pop();\n                    }\n                    x => acc.push(str::parse::<i32>(x).unwrap()),\n                }\n                acc\n            })\n            .iter()\n            .sum()\n    }\n}\n```
[]