From f6d32d889b3bdece06ae4516f2b21f80fd8a4cc5 Mon Sep 17 00:00:00 2001 From: Aryan Date: Wed, 12 Jul 2023 08:07:39 +0530 Subject: [PATCH] added code for valid subarary product . --- algorithms/CPlusPlus/Arrays/subarray-product.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/algorithms/CPlusPlus/Arrays/subarray-product.cpp b/algorithms/CPlusPlus/Arrays/subarray-product.cpp index 6fb0d9b1..423d31b2 100644 --- a/algorithms/CPlusPlus/Arrays/subarray-product.cpp +++ b/algorithms/CPlusPlus/Arrays/subarray-product.cpp @@ -13,7 +13,7 @@ A C++ (CPP) code to find how many subarrays ( contiguous part of an array) are p Idea - Use Sliding Window Algorithm -Procedure - +Procedure Go in a loop ( j=0 to n) and create a sliding window each time starting from current element and increase its size (in second loop) till both of these conditions are true ( product of all elemnts in the window < k and iterator < last_index )