Given a positive integer n, print all combination of numbers from 1 to n having sum n.
Given a weighted graph, find the maximum cost path from given source to destination that is greater than a given integer x. The path should not contain any cycles.
Given an array of distinct integers, replace each element of the array by its corresponding rank in the array.
Given a M x N matrix, find all common elements present in every row.
Given a positive integer n and k, perform circular shift on binary representation of it by k positions.
Given an unsorted array of integers, print all triplets in it with sum less than or equal to given number.
Given a C-style string and a pattern, in-place replace all non-overlapping occurrences of the pattern in the string by a specified character.
Given an unsorted array of integers containing many duplicates elements, rearrange the given array such that same element appears together and relative order of first occurrence of each element remains unchanged.
In this post we will discuss few related problems that can be solved without using multiplication and division operators.
Given a binary tree, count all subtrees in it such that every node in the subtree have same value.
Given two integers, find minimum difference between their index in a given array in linear time and single traversal of the array.
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.