Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems ...
In this problem, you are given two big numbers as string and you are expected to print sum of them. However, You should keep in your mind that the numbers you are given may be too large to fit in int ...
Given an integer array of size n, find the maximum of the minimum’s for every window size in the array. Note that window size is 1..n.
Example:
When arr = [10, 20, 30, 50, 10, 70, 30], the output s ...
Given a pattern containing only Is and Ds, I for increasing and D for decreasing, devise an algorithm to print the minimum number following that pattern.
Digits are 1..9 and can’t repeat.
Examples:
...
Given a string of brackets, the task is to find an index k which decides the number of opening brackets is equal to the number of closing brackets. The string must consist of only opening and closing ...
Given an array representing heights of buildings, the array has buildings from left to right. Count number of buildings facing the sunset. It is assumed that heights of all buildings are distinct.
E ...
Given a sequence of strings, the task is to find out the second most repeated (or frequent) string in the given sequence.
Example:
["aaa", "bbb", "ccc", "bbb", "aaa", "aaa"] should return "bbb".
Find the maximum sum of lengths of non-overlapping subarrays (contiguous elements) with k as the maximum element of each subarray.
Examples:
arr = [2, 1, 4, 9, 2, 3, 8, 3, 4]and k = 4 should return ...
Given two expressions in the form of strings, the task is to compare them and check if they are the same. Expressions consist of lowercase alphabets, '+', ‘'-' and '( )'.
Examples:
"-(a+b+c)"and "- ...
Given a string s, break s such that every partition can be found in the dictionary. Return the minimum number of breaks needed.
Example:
Given a dictionary ["Cat", "Mat", "Ca", "tM", "at", "C", "D ...