From 7cedd45f49ff68a9fcac79feb2964395e26810aa Mon Sep 17 00:00:00 2001 From: abhishek-217 Date: Mon, 14 Oct 2024 23:29:49 +0530 Subject: [PATCH] Solution of day 1 question on leetcode --- solutions/day01/solution_cpp.cpp | 24 ++++++++++++++++++++++++ solutions/day15/Solution_cpp.cpp | 0 2 files changed, 24 insertions(+) create mode 100644 solutions/day01/solution_cpp.cpp create mode 100644 solutions/day15/Solution_cpp.cpp diff --git a/solutions/day01/solution_cpp.cpp b/solutions/day01/solution_cpp.cpp new file mode 100644 index 0000000..e0f3940 --- /dev/null +++ b/solutions/day01/solution_cpp.cpp @@ -0,0 +1,24 @@ +class Solution { +public: + bool canArrange(vector& arr, int k) { + int n = arr.size(); + + vectorresult(k,0); + + for(int i=0 ; i