## Common elements in all rows of a given matrix

Given an m x n matrix, find all common elements present in all rows in O(mn) time and one traversal of matrix. Example: Input: mat[4][5]… 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
- Print characters and their frequencies in order of occurrence using a LinkedHashMap in Java
- Count of pairs between two arrays such that the sums are distinct
- 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
- Extendible Hashing (Dynamic approach to DBMS)
- Number of Positions to partition the string such that atleast m characters with same frequency are present in each substring
- Rearrange given string to maximize the occurrence of string t
- What are Hash Functions and How to choose a good Hash Function?
- Number of ways in which the substring in range [L, R] can be formed using characters out of the range
- Check if product of array containing prime numbers is a perfect square
- 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
- Find number of unique triangles among given N triangles

Given an m x n matrix, find all common elements present in all rows in O(mn) time and one traversal of matrix. Example: Input: mat[4][5]… Read More »

Every data structure has its own special characteristics for example a BST is used when quick searching of an element (in log(n)) is required. A… Read More »

Given an array of integers, and a number ‘sum’, find the number of pairs of integers in the array whose sum is equal to ‘sum’.… Read More »

Given two arrays which are duplicates of each other except one element, that is one element from one of the array is missing, we need… Read More »

Given an array with n distinct elements, convert the given array to a form where all elements are in range from 0 to n-1. The… Read More »

Given a fraction, find recurring sequence of digits if exists, otherwise print “No recurring sequence”. Examples: Input : Numerator = 8, Denominator = 3 Output… Read More »

We have discussed Overview of Array, Linked List, Queue and Stack. In this article following Data Structures are discussed. 5. Binary Tree 6. Binary Search… Read More »

Given an integer, find the most occurring digit in it. If two or more digits occur same number of times, then return the highest of… Read More »

Given an array of integers and a number k, write a function that returns true if given array can be divided into pairs such that… Read More »

Given an array of distinct integers, find if there are two pairs (a, b) and (c, d) such that a+b = c+d, and a, b,… Read More »

Two pairs (a, b) and (c, d) are said to be symmetric if c is equal to b and a is equal to d. For… Read More »

Given an array of integers, find the length of the longest subarray with sum equals to 0. Examples : Input: arr[] = {15, -2, 2,… Read More »

Recently walmart labs came to our campus for campus recruitment. Here is my interview experience: Round 1 (MCQ + Coding Questions) This round was conducted… Read More »

MakeMyTrip recently visited our campus. There were 4 rounds. Online Round ( 1 Hour ) This round consisted of 20 aptitude questions and 3 coding… Read More »

Given an array of integers, find the length of the longest sub-sequence such that elements in the subsequence are consecutive integers, the consecutive numbers can… Read More »