Akshaya Biswalakshaya-biswal.hashnode.dev·Aug 25, 2024Best Time to Buy and Sell Stock ( Leetcode121)You are given an array where each element represents the price of a given stock on a day. You need to find the maximum profit you can achieve by buying on one day and selling on another later day. If no profit is possible, return 0. Approach: The sli...DiscussData Structures and Algorithms in JavaScriptDSA

Musab Rayantechblogsbymusab.hashnode.dev·Aug 24, 2024Essential Techniques for Array Problem Solving You Must Know 👨💻If you are doing competitive programming (CP) or simply solving problem-solving questions on arrays, optimizing the time complexity of your solutions is important, specially when you are dealing with large inputs. Two of the most effective techniques...Discuss·1 likearray

SANTOSH SINGHsantoshsingh.hashnode.dev·Aug 19, 2024Mastering the Sliding Window Technique in Problem SolvingThe sliding window method is a powerful technique that helps in optimizing solutions for a variety of problems, particularly those involving arrays or sequences. This approach is often more efficient than traditional methods like nested loops, making...Discuss·3 likesProblem Solvers' Journalvariable sliding window

MakxforMelsonicmelsonic.hashnode.dev·Aug 6, 2024You Don't Know Rate LimiterWhat is a Rate Limiter 🤔 Rate Limiter is a web application decision engine that decides whether a client request should be fulfilled or rejected. A rate limiter tracks the request rate against each client and if that exceeds a certain threshold, it ...Discuss·10 likesratelimit

Michael Pipermichaelpiper.hashnode.dev·Jul 30, 2024Understanding Binary Search, DFS, BFS, and Sliding Window with Sample Code in JavaLet's explore these fundamental algorithms and techniques using Java. 1. Binary Search Binary Search is an efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could...Discussalgorithms

Vineeth Chivukulavineethchivukula.hashnode.dev·Jun 24, 2024Understanding the Sliding Window TechniqueThe sliding window technique is a method used to solve problems involving arrays or lists by maintaining a subset of data within a certain "window" that "slides" through the array or list. This technique is particularly useful for problems involving ...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·39 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