## Find if there is a rectangle in binary matrix with corners as 1

There is a given binary matrix, we need to find if there exists any rectangle or square in the given matrix whose all four corners… Read More »

- Find the longest string that can be made up of other strings from the array
- Rearrange characters in a string such that no two adjacent are same using hashing
- Flip minimum signs of array elements to get minimum sum of positive elements possible
- Split the array elements into strictly increasing and decreasing sequence
- Count duplicates in a given linked list
- Find uncommon characters of the two strings | Set 2
- Design a stack which can give maximum frequency element
- Count equal pairs from given string arrays
- Minimum number of given operations required to convert a permutation into an identity permutation
- Remove all occurrences of any element for maximum array sum
- Minimum Bitwise XOR operations to make any two array elements equal
- Longest subsequence such that every element in the subsequence is formed by multiplying previous element with a prime
- Count of pairs of strings which differ in exactly one position
- Count of pairs between two arrays such that the sums are distinct
- Print characters and their frequencies in order of occurrence using a LinkedHashMap in Java
- Partiton the string in two parts such that both parts have at least k different characters
- Minimum number of given operations required to reduce the array to 0 element
- Print characters having odd frequencies in order of occurrence
- Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array
- Count number of pairs in array having sum divisible by K | SET 2
- Maximum length of a sub-array with ugly numbers
- Extendible Hashing (Dynamic approach to DBMS)
- Rearrange given string to maximize the occurrence of string t
- Number of Positions to partition the string such that atleast m characters with same frequency are present in each substring
- What are Hash Functions and How to choose a good Hash Function?
- Check if product of array containing prime numbers is a perfect square
- Number of ways in which the substring in range [L, R] can be formed using characters out of the range
- Count of quadruplets with given Sum | Set 2
- Find the difference of count of equal elements on the right and the left for each element
- Count distinct points visited on the number line

There is a given binary matrix, we need to find if there exists any rectangle or square in the given matrix whose all four corners… Read More »

Given two arrays A[] and B[] of size n. It is given that both array individually contains distinct elements. We need to find the sum… Read More »

Given N sweets which can be of many different types and k customers, one customer won’t take the same type of sweet more than 2… Read More »

Given an array and an integer K. We need to find the maximum of every segment of length K which has no duplicates in that… Read More »

Given an array of n positive integers. We need to find the largest increasing sequence of consecutive positive integers. Examples: Input : arr[] = {5,… Read More »

Given a Binary Tree, find count of distinct nodes in a root to leaf path with maximum distinct nodes. Examples: Input : 1 / \… Read More »

Given an array of N integers. In the given, for each positive element ‘x’ there exist a negative value ‘-x’, except one integer whose negative… Read More »

Given N elements and a number K, find the longest subarray which has not more than K distinct elements.(It can have less than K) Examples:… Read More »

Given an array of size N. Let A and B be the minimum and maximum in the array respectively. Task is to find how many… Read More »

We are given an array a consisting of n integers and an integer k. We need to find the minimum range in array [l, r]… Read More »

Given a string, sort it in descending order. Examples: Input : alkasingh Output : snlkihgaa Input : nupursingh Output : uusrpnnihg Input : geeksforgeeks Output… Read More »

Given an array of size n. The task is to find the longest subsequence such that difference between adjacents is one. Time Complexity of O(n)… Read More »

Given an array of n integers and q queries, print the number of next greater elements to the right of the given index element. Examples:… Read More »

Given an array of size n containing 0’s and 1’s only. The problem is to find the length of the longest subarray having count of… Read More »

Given a string, find the maximum number of characters between any two same character in the string. If no character repeats, print -1. Examples: Input… Read More »