From 4595e8cb1423f4a788e6b3077ed1d71ea43d4e2e Mon Sep 17 00:00:00 2001 From: Ankush kumar <91266368+Ankush11903@users.noreply.github.com> Date: Sun, 8 Jan 2023 09:00:52 +0530 Subject: [PATCH 1/2] Create 0122 - Best Time to Buy And Sell Stock II --- cpp/0122 - Best Time to Buy And Sell Stock II | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cpp/0122 - Best Time to Buy And Sell Stock II diff --git a/cpp/0122 - Best Time to Buy And Sell Stock II b/cpp/0122 - Best Time to Buy And Sell Stock II new file mode 100644 index 000000000..673425152 --- /dev/null +++ b/cpp/0122 - Best Time to Buy And Sell Stock II @@ -0,0 +1,13 @@ +class Solution { +public: + int maxProfit(vector& prices) { + int ans=0; + for(int i=0;i Date: Sun, 8 Jan 2023 19:12:18 +0530 Subject: [PATCH 2/2] Update and rename 0122 - Best Time to Buy And Sell Stock II to 0122 - Best Time to Buy And Sell Stock II.cpp --- ...l Stock II => 0122 - Best Time to Buy And Sell Stock II.cpp} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename cpp/{0122 - Best Time to Buy And Sell Stock II => 0122 - Best Time to Buy And Sell Stock II.cpp} (85%) diff --git a/cpp/0122 - Best Time to Buy And Sell Stock II b/cpp/0122 - Best Time to Buy And Sell Stock II.cpp similarity index 85% rename from cpp/0122 - Best Time to Buy And Sell Stock II rename to cpp/0122 - Best Time to Buy And Sell Stock II.cpp index 673425152..7a94bd3c8 100644 --- a/cpp/0122 - Best Time to Buy And Sell Stock II +++ b/cpp/0122 - Best Time to Buy And Sell Stock II.cpp @@ -1,6 +1,6 @@ class Solution { public: - int maxProfit(vector& prices) { + int maxProfit(vector& prices) { int ans=0; for(int i=0;i