## Find Index of Maximum Occurring Element with Equal Probability

Given a collection of integers, develop an algorithm to find the index of maximum occurring element with equal probability.

Coding made easy

Given a collection of integers, develop an algorithm to find the index of maximum occurring element with equal probability.

Given an array of integers, check if an array is formed by consecutive integers.

Given an unsorted array of integers, find two non-overlapping pairs in it having same sum.

Given a binary tree, write an efficient algorithm to print right view of given binary tree.

Given a directed acyclic graph (DAG), print it in Topological order using Kahn’s Topological Sort algorithm. If the DAG has more than one topological ordering, print any of them.

Given a set S, generate all distinct subsets of it i.e., find distinct power set of set S. A power set of any set S is the set of all subsets of S, including the empty set and S itself.

Given a binary tree, write an iterative algorithm to print leaf to root path for every leaf node of binary tree. Use of Recursion is prohibited.

Given a binary search tree, find a pair with given sum present in it.

Given a binary tree, write an efficient algorithm to compute maximum width of it.

Consider a directed graph where weight of itsÂ edges can be one of x, 2x or 3x (x is a given integer), compute the least cost path from source to destination efficiently.

Given a square matrix, print maximum length snake sequence in it. A Snake sequence is defined as a sequence of numbers where each new number, which can only be located to the right or down of the current number, is either plus or minus one.

In k-partition problem, we need to partition an array of positive integers into k disjoint subsets that all have equal sum and they completely covers the set.