## Find Probability that a Person is Alive after Taking N steps on an Island

Given an island in the form of square matrix and a point inside the matrix where a person is standing. The person is allowed to move one step in any direction (right, left, top, down) on the matrix. If he steps outside the matrix, he dies. Calculate the probability that he is alive after he …

## Custom Sort | Sort array based on another array

Given two arrays, reorder elements of first array by order of elements defined by the second array.   Elements which are not present in the second array but present in first array should be appended in the end sorted. Second array can contain some extra elements which are not part of first array.

## Custom Sort | Sort elements by their frequency and Index

Given an array, sort its element by their frequency and index. i.e. – If two elements have the different frequencies, then the one which has more frequency should come first. – If two elements have the same frequencies, then the one which has less index should come first.

## Find common elements present in all rows of a matrix

In this post, we will see how to find common elements present in all rows of a given MxN matrix. The solution should traversal the matrix once and print all commons elements in O(M*N) time.

## Find numbers represented as sum of two cubes for two different pairs

Given a large number N, find all positive numbers less than N that can be represented as sum of two cubes for at-least two different pairs.

## Find Duplicate Rows in a Binary Matrix

Find duplicate rows present in a given binary matrix by traversing the matrix only once.

## Memory efficient Trie Implementation in C++ using Map | Insert, Search and Delete

In this post, we will cover memory efficient Trie implementation in C++ using map data structure.

## 5 ways to Iterate Map using keySet() in Java

In this post, we will discuss various methods to iterate Map using keySet() in Java.

## 5 ways to Iterate Map in Java using entrySet()

In this post, we will discuss various methods to iterate Map in Java using entrySet() method.