## Given a sequence of words, print all anagrams together | Set 1

Given an array of words, print all anagrams together. For example, if the given array is {“cat”, “dog”, “tac”, “god”, “act”}, then output may be… Read More »

## Find four elements that sum to a given value | Set 2 ( O(n^2Logn) Solution)

Given an array of integers, find any one combination of four elements in the array whose sum is equal to a given value X. For… Read More »

## Largest subarray with equal number of 0s and 1s

Given an array containing only 0s and 1s, find the largest subarray which contain equal no of 0s and 1s. Expected time complexity is O(n).… Read More »

## Union and Intersection of two Linked Lists

Given two Linked Lists, create union and intersection lists that contain union and intersection of the elements present in the given lists. Order of elments… Read More »

## Vertical Sum in a given Binary Tree | Set 1

Given a Binary Tree, find the vertical sum of the nodes that are in the same vertical line. Print all sums through different vertical lines.… Read More »

## Find whether an array is subset of another array | Added Method 3

Given two arrays: arr1[0..m-1] and arr2[0..n-1]. Find whether arr2[] is a subset of arr1[] or not. Both the arrays are not in sorted order. It… Read More »

## Find the smallest window in a string containing all characters of another string

Given two strings string1 and string2, the task is to find the smallest substring in string1 containing all characters of string2 efficiently. Examples: Input: string… Read More »

## Find the Number Occurring Odd Number of Times

Given an array of positive integers. All numbers occur even number of times except one number which occurs odd number of times. Find the number… Read More »

## Given an array A[] and a number x, check for pair in A[] with sum as x

Write a program that, given an array A[] of n numbers and another number x, determines whether or not there exist two elements in S… Read More »

## Return maximum occurring character in an input string

Write an efficient function to return maximum occurring character in the input string e.g., if input string is “test” then function should return ‘t’. Recommended:… Read More »