Given a binary circular array arr[] of size N, the task is to find the minimum swaps to group all 0s together in the array.… Read More

# Tag Archives: sliding-window

Given a string str of length N (divisible by 3) consisting of atmost three distinct characters, the task is to find the length of the… Read More

Given an array nums[] and a value k. The task is to find the maximum elements that can be made equal with at most k… Read More

Given an array arr[] containing N positive integers and an integer K. The task is to replace every array element with the average of previous… Read More

Given two arrays W[] and C[] containing weight and cost of N (1 to N) items respectively, and an integer K, find a segment from… Read More

Given an array arr[] having N integers in non-decreasing order and an integer K, the task is to find the minimum value of (j –… Read More