Given an integer range, for all M in that inclusive range, determine the minimum – abs(arr[i]-M) for all i
Print all the nodes that you encounter while printing DFS tree. Then, print the distance ‘D’ between the source ‘P’ and the destination ‘.’
Given a string s such that, s ∈ merge(reverse(A), shuffle(A)) for some string A, find the lexicographically smallest A
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For n = 2, output: [“(())”,”()()”]
Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the number of 1's in the binary representation of i.
Given a string s, consisting of English letters, symbols and spaces, find the length of the longest substring without repeating characters.
Given two strings and an integer, determine the length of the longest common substrings of the two strings that differ in no more than k positions.
Two words are anagrams of one another if their letters can be rearranged to form the other word. Given a string, split it into two contiguous substrings of equal length. Determine the minimum number of characters to change to make the two substrings into anagrams of one another.
We are very near to our goal now. The enemy is being weakened continuously. But alas, sensing his fall, the hacker has spread a worm into our network. It is consuming all our files at a tremendous rate and must be stopped at all costs. The only way to stop it is to enter a specific code number in to the worm.
The first and the last digits of the price were not readable. Although, the number of nails in the box could be read clearly. The box read,
72 nails, Rs. _679_