## 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 »

## Implementing our Own Hash Table with Separate Chaining in Java

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 »

## Count pairs with given sum

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 »

## Find lost element from a duplicated array

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 »

## Convert an array to reduced form | Set 1 (Simple and Hashing)

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 »

## Find Recurring Sequence in a Fraction

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

## Overview of Data Structures | Set 2 (Binary Tree, BST, Heap and Hash)

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 »

## Find the most frequent digit without using array/string

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 »

## Check if an array can be divided into pairs whose sum is divisible by k

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 »

## Find four elements a, b, c and d in an array such that a+b = c+d

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 »

## Given an array of pairs, find all symmetric pairs in it

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 »

## Find the length of largest subarray with 0 sum

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 »

## Walmart Labs Interview Experience | Set 5 (On-Campus)

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 Interview Experience | Set 8 (On-Campus)

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 »

## Longest Consecutive Subsequence

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 »