## Area of the largest square that can be formed from the given length sticks using Hashing

Given an array arr[] of N integers representing the heights of the sticks. The task is to find the area of the largest square that… Read More »

- Count common characters in two strings
- Find minimum difference between any two elements | Set 2
- Find the minimum number of operations required to make all array elements equal
- Find the smallest positive number missing from an unsorted array : Hashing Implementation
- Find sum of a[i]%a[j] for all valid pairs
- Minimum sum of two numbers formed from digits of an array in O(n)
- Design a stack which can give maximum frequency element
- Find minimum changes required in an array for it to contain k distinct elements
- Remove all occurrences of any element for maximum array sum
- Minimum number of Bottles visible when a bottle can be enclosed inside another Bottle
- Queries to find the first non-repeating character in the sub-string of a string
- Find the first duplicate element in the linked list
- Count of quadruplets from range [L, R] having GCD equal to K
- 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
- Case-specific sorting of Strings in O(n) time and O(1) space
- Count the number of pairs (i, j) such that either arr[i] is divisible by arr[j] or arr[j] is divisible by arr[i]
- Minimum deletions required such that any number X will occur exactly X times
- Find the last non repeating character in string
- Print characters having odd frequencies in order of occurrence
- Queries to find the last non-repeating character in the sub-string of a given string
- Sum of all odd frequency nodes of the Linked List
- Swap all occurrences of two characters to get lexicographically smallest string
- Length of the largest substring which have character with frequency greater than or equal to half of the substring
- Number of Positions to partition the string such that atleast m characters with same frequency are present in each substring
- Count pairs with set bits sum equal to K
- Frequency of a substring in a string using pthread
- Longest prefix in a string with highest frequency
- Largest even number that can be formed by any number of swaps
- Number of ways in which the substring in range [L, R] can be formed using characters out of the range

Given an array arr[] of N integers representing the heights of the sticks. The task is to find the area of the largest square that… Read More »

Given an array arr of size N and a number K. The task is to find the minimum elements to be replaced in the array… Read More »

Given a chemical formula as a string, the task is to get the count of atoms in this chemical formula. Examples: Input: str = “Fe2H3OH”… Read More »

Given an input string and a substring. Find the frequency of occurrences of a substring in the given string using pthreads. Examples: Input: string =… Read More »

Given N bottles. The ith bottle has A[i] radius. Once a bottle is enclosed inside another bottle, it ceases to be visible. The task is… Read More »

Given an array arr[] of size N. The task is to find the sum of arr[i] % arr[j] for all valid pairs. Answer can be… Read More »

Given an array arr[] of size N. The task is to find X – Y for each of the element where X is the count… Read More »

Given a string str of lower case English alphabets. One can choose any two characters in the string and replace all the occurrences of the… Read More »

Given a string S of length N and an integer P(1≤P≤N) denoting the position of a character in the string. The task is to find… Read More »

Given two string s1 and s2, the task is to check if characters of the first string can be mapped with the character of the… Read More »

Given a string str consisting of uppercase and lowercase characters. The task is to sort uppercase and lowercase characters separately such that if the ith… Read More »

Given two strings str1 and str2 of lengths M and N respectively. The task is to find all the distinct string of length M +… Read More »

Given a string of lowercase English alphabets and an integer 0 < K <= 26. The task is to divide the string into two parts… Read More »

Given a linked list. Find the first element from the left which appears more than once. If all the elements are unique then print -1.… Read More »

Given two integers N and K. Find the numbers of triplets (a, b, c) such that 0 ≤ a, b, c ≤ N and (a… Read More »