Sliding window interview questions

Longest subarray with sum at most k

Given an array of integers A[], find the length of the longest subarray with the sum at most k where k is an integer. For example: Input: A[] = [10, ...
Read More

Longest Substring Without Repeating Characters

Given a string, find the longest substring without repeating characters in it. For example, Input: S = "abcaabaca"  Output: 3 Explanation: The longest substring without repeating characters will be "abc" Input: "bbbbb" Output: ...
Read More

Find k number in sliding window problem

Sliding window problem Given a large integer array of size x, window size of n and a random number k, find smallest k numbers in every window of n elements ...
Read More