Search results
Sliding Window - LeetCode. Explore. Problems. Contest. Discuss. Interview. Store. Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
Sliding Window Maximum - You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window.
Fixed Sliding Window: 1) https://leetcode.com/problems/maximum-sum-of-distinct-subarrays-with-length-k/ (Leetcode 2461) 2) https://leetcode.com/problems/sliding-subarray-beauty/ (Leetcode 2653) 3) https://leetcode.com/problems/maximum-points-you-can-obtain-from-cards/ (Leetcode 1423)
Overview. Sliding Window Technique is a popular method in algorithmic problems because of its high efficiency (mostly linear) It helps to avoid computing repetitive problems by computing only the new part that's introduced in the data set and discarding the one that moves out, usually 1 at a time.
The choice of technique for solving a sliding window problem depends on the specific problem and the constraints of the problem. For example, if the sliding window is small, then hashing may be a good choice. However, if the sliding window is large, then two pointers may be a better choice.
Longest Substring Without Repeating Characters - Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3.
Sliding Window Median - The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle values.
Substrings of Size Three with Distinct Characters - A string is good if there are no repeated characters. Given a string s , return the number of good substrings of length three in s . Note that if there are multiple occurrences of the same substring, every occurrence should be counted.
Minimum Window Substring - Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string "".
Boost your coding interview skills and confidence by practicing real interview questions with LeetCode. Our platform offers a range of essential problems for practice, as well as the latest questions being asked by top-tier companies.