## Median of sliding window in an array | Set 2

Prerequisites: Policy based data structure, Sliding window technique. Given an array of integer arr[] and an integer K, the task is to find the median… Read More »

- Must do Math for Competitive Programming
- Which C++ libraries are useful for competitive programming?
- Breadth First Search without using Queue
- Which Java libraries are useful for competitive programming?
- Minimize the maximum difference between adjacent elements in an array
- 7 Best Coding Challenge Websites in 2020
- Which Python Modules are useful for competitive programming?
- Speed up Code executions with help of Pragma in C/C++
- Basic Algorithm Techniques Not Taught in Academics
- Setting up a C++ Competitive Programming Environment
- Writing code faster during Competitive Programming in C++
- Check if sum of Fibonacci elements in an Array is a Fibonacci number or not
- Count of subarrays of an Array having all unique digits
- Logarithm tricks for Competitive Programming
- Default values in a Map in C++ STL
- Move all zeroes to end of array using Two-Pointers
- Sum of GCD of all possible sequences
- How To Approach A Coding Problem ?
- Minimize the maximum difference of adjacent elements after at most K insertions
- Maximum LCM among all pairs (i, j) from the given Array
- Count of subarrays which start and end with the same element
- Submatrix of given size with maximum 1's
- Kth most frequent Character in a given String
- Length of the smallest substring which contains all vowels
- Longest Mountain Subarray
- Find distance between two nodes in the given Binary tree for Q queries
- Find maximum subset sum formed by partitioning any subset of array into 2 partitions with equal sum
- Find last remaining element after reducing the Array
- Queries for elements having values within the range A to B in the given index range using Segment Tree
- Count of substrings of length K with exactly K distinct characters

Prerequisites: Policy based data structure, Sliding window technique. Given an array of integer arr[] and an integer K, the task is to find the median… Read More »

Given an array arr[] of length N and an integer K, the task is to find the longest subarray with difference between any two distict… Read More »

Given a string str and two characters X and Y, the task is to write a recursive function to replace all occurrences of character X… Read More »

Given an array arr[] of N integers, the task is to replace each element of Array with their rank in array. The rank of an… Read More »

Given three positive integers N, A, and B, the task is to check if it is possible to obtain N by adding or subtracting A… Read More »

Given an array arr[] of size N, the task is to find the number of non-empty subsequences from the given array such that no two… Read More »

Given an integer N, the task is to find its perfect square root by repeated subtraction only. Examples: Input: N = 25 Output: 5 Input:… Read More »

Given an integer array arr[], the task is to find the largest sum contiguous subarray of non-negative elements and return its sum. Examples: Input: arr[]… Read More »

Given an arr[] of size N whose elements are sorted in descending order. The task is to find if the given array can be sorted… Read More »

Given a matrix of size N x M and an integer X, the task is to find the number of sub-squares in the matrix with… Read More »

Given an array arr[] of size N, the task is to rearrange the array elements such that for every index i(1 <= i <= N… Read More »

Given an undirected graph with V vertices and E edges, the task is to print all the independent sets and also find the maximal independent… Read More »

Given two integers A and B, the task is to print the integer among the two, which will be converted to an odd integer by… Read More »

Given a string str, two characters X and Y. The task is to find the length of the longest substring that starts with X and… Read More »

Given height H, and width W, of a rectangle, the task is to find the side of a square of the minimum area in which… Read More »