Given a list containing future prediction of share prices, find maximum profit that can be earned by buying and selling shares any number of times with constraint that a new transaction can only start after previous transaction is complete. i.e. we can only hold at-most one share at a time.
In trapping rain water problem, we need to find the maximum amount of water that can be trapped within given set of bars where width of each bar is 1 unit.
In this post, we will discuss about std::prev_permutation which can be used to find the lexicographically smaller permutations of a string.
Write a Java program to generate all permutations of a string.
Write an efficient function to implement itoa() function in C. Standard itoa() function convert input number to its corresponding C-string using the specified base.
Apache Commons’s MultiValuedMap Interface allows the mapping of a single key to multiple values in Java, unlike java.util.Map where a key can only be associated with a single value.
Given a schedule containing arrival and departure time of trains in a station, find minimum number of platforms needed in the station so to avoid any delay in arrival of any train.
Given an array of integers, find the maximum sum of subsequence of given array where subsequence contains no adjacent elements.
Given a set of intervals, print all non-overlapping intervals after merging overlapping intervals.
Given a sequence consisting of ‘I’ and ‘D’ where ‘I’ denotes increasing sequence and ‘D’ denotes the decreasing sequence. Decode the given sequence to construct minimum number without repeated digits.
Given two sorted array of integers, find a maximum sum path involving elements of both arrays whose sum is maximum. We can start from either arrays but we can switch between arrays only through its common elements.
Given an array of integers, find the smallest window in array sorting which will make the entire array sorted in increasing order.