adding comments to the leetcode problem

This commit is contained in:
Jidong Xiao
2023-09-18 23:04:03 -04:00
parent c42e5fa30d
commit 2cc43e4a00

View File

@@ -1,3 +1,6 @@
// this is a very bad solution, in this problem we do not need to use dynamic memory, because std::vector automatically uses dynamic memory internally.
// the solution below therefore is just a demonstration of how to use the new and delete operator.
class Solution { class Solution {
public: public:
vector<int> runningSum(vector<int>& nums) { vector<int> runningSum(vector<int>& nums) {