Software Engineering Bloghuanan.hashnode.dev·Mar 30, 2024Leetcode 713: Subarray Product Less Than KFor those who would like to try it out first! https://leetcode.com/problems/subarray-product-less-than-k/ Question Given an array of integers nums and an integer k, return the number of contiguous subarrays where the product of all the elements in th...Discusssliding window

Nitishkumarnitishkumar07.hashnode.dev·Jan 18, 2024DAY 3 #coding challengeProblem Statement (Water the plants : Medium) A gallery with plants is divided into n parts, numbered 0, 1, 2, 3, ..., n-1. There are provisions for attaching water sprinklers in every division. A sprinkler with range x at division i can water all di...Discusspodt

Lara Alexanderdevlarabar.hashnode.dev·Nov 1, 2023The Sliding WindowThe Sliding Window is a type of algorithm that helps us solve problems with fixed windows. It is used to optimize our programs, reducing the need for extra loops by reusing the result of the previous step in the next step. The brute-force approach to...DiscussDSA

Kenil Kananikenilkanani.hashnode.dev·Sep 3, 2023Sliding WindowWhat is the sliding window algorithm? The sliding window algorithm is a technique used to solve problems that involve arrays/lists. It is a very efficient technique that can be used to solve problems in linear time complexity. The sliding window algo...Discuss·38 readssliding window

Retrieverretriever.hashnode.dev·Jul 2, 2023get_max_window C++ and RustInput: Array of integers. An integer 'w' which is the window size. Output: An array of integers, representing the maximum values in all contiguous subarrays of size 'w'. Algorithm uses a deque to efficiently keep track of the maximum element in...Discusssliding window

Rakesh Guptarakeshgk.hashnode.dev·Jun 12, 2023DSA Ninja Moves: Empowering Algorithms with the Sliding Window Technique🥷Overview🧐 Sliding Window Algorithm is an approach or technique for reducing the complexity of algorithms. It is used such that the need for reusing the loops gets lessened and hence the program gets optimized. In this method, we reuse the result of ...Discuss·20 likes·30 readsDSA

Nilesh Saininileshsaini.hashnode.dev·May 30, 2023Find Pivot IndexThere are countless ways to approach this problem and optimize your solution. In this article, we’ll explore one of those strategies to tackle this problem. Let’s see the problem statement first. Problem Statement: Given an array of integers nums, c...Discuss·67 readsJavaScript

Sandeep Ranasandrana.hashnode.dev·May 20, 2023Minimum Size Subarray SumIntroduction Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. If there is no such subarray, return 0 instead. // Example 1 Input: target = 7,...Discuss·87 readsData Structures and Algorithms In Javascriptleetcode

Umar Farookumarfarook.hashnode.dev·Apr 29, 2023Sliding Window Algorithm | JAVApublic class SlidingWindow { public static void main(String[] args) { int[] arr = {2, -4, 8, 56, 98, 85, 25, 5}; System.out.println(" Max sum of subarray = " + MaximumSumofSubarray(arr, 4)); } static int M...DiscussJava

Souvik Raj Singhsouvikrajsingh.hashnode.dev·Mar 27, 2023Unleashing the Power of the Sliding Window: The Key to Unlocking Complex Subarray Problems - Without Breaking a SweatIf the sliding window approach were a superhero, it would be Deadpool - efficient, powerful, and not afraid to break the fourth wall. Think of it like a magic window that slides over an array or string, revealing the optimal solution for problems tha...Discuss·1 like·57 readsAlgorithms for Interviews 🚀WeMakeDevs