From 2cc43e4a00faf6e7ab69fa4d8a4feb2c68a1d2e4 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Mon, 18 Sep 2023 23:04:03 -0400 Subject: [PATCH] adding comments to the leetcode problem --- leetcode/p1480_runningsumofarray.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/leetcode/p1480_runningsumofarray.cpp b/leetcode/p1480_runningsumofarray.cpp index d1440e5..5ef43df 100644 --- a/leetcode/p1480_runningsumofarray.cpp +++ b/leetcode/p1480_runningsumofarray.cpp @@ -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 { public: vector runningSum(vector& nums) {