## Solve given set of problems without using multiplication or division operators

In this post we will discuss few related problems that can be solved without using multiplication and division operators.

## Count all subtrees having same value of nodes in a binary tree

Given a binary tree, count all subtrees in it such that every node in the subtree have same value.

## Find minimum difference between index of two given elements present in the array

Given two integers, find minimum difference between their index in a given array in linear time and single traversal of the array.

## Find Inorder Successor for given key in a BST

Given a BST, find inorder successor of a given key in it. If the given key do not lie in the BST, then return the next greater key (if any) present in the BST.

## Find maximum absolute difference between sum of two non-overlapping sub-arrays

Given an array, find the maximum absolute difference between sum of elements of two non-overlapping sub-arrays in linear time.

## Determine negative-weight cycle in a graph

Given a directed weighted graph, report a negative-weight cycle in the graph if any. A negative-weight cycle is a cycle in graph whose edges sum to a negative value.

## Find all Symmetric Pairs in an Array of Pairs

Given an array of pairs of integers, find all symmetric pairs i.e. pairs that are mirror of each other. For instance, pairs (x, y) and (y, x) are mirrors of each other.

## Construct the longest palindrome by shuffling or deleting characters from a string

Write a efficient algorithm to construct the longest palindrome by shuffling or deleting characters from a given string.

## Partition an array into two sub-arrays with the same sum

Given an array of integers, partition the array into two sub-arrays having the same sum of elements.

## Find count of distinct elements in every sub-array of size k

Given an array and an integer k, find the count of distinct elements in every sub-array of size k in the array.

## Determine if characters of a String follows a specified order or not

Given a string and a pattern (having all distinct characters), determine if characters of the string follows specific order as defined by characters of the pattern.

## Find two numbers with maximum sum formed by array digits

Given an array of integers between 0 to 9, find two numbers with maximum sum formed by using all digits of the array. The difference in number of digits of the two numbers should be ± 1.