String is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and the length changed, or it may be fixed (after creation).
An encoded string is given. The pattern in which the strings are encoded is as follows: [substr] means that the substring 'substr' appears count times. The task is to decode the given string.
Exampl ...
Given a string you need to print longest possible substring that has exactly k unique characters. If there are more than one substring of longest possible length, return the lexicographically largest ...
Given a string, the task is to return the length of its longest possible chunked palindrome. It means a palindrome formed by substrings. For better understanding, look at the examples below.
Example ...
Given a string of characters of length less than 10, return all the alpha-numeric abbreviations of the string (in lexicographic order).
The alpha-numeric abbreviation is in the form of characters mi ...
Given two sequences A and B, find out number of unique ways to transform sequence A into sequence B. Transformation means converting string A (by removing 0 or more characters) to string B.
Examples ...
Given a string A consisting of n characters and a string B consisting of m characters, write a function that will return the number of times A must be stated such that B is a substring of the repeate ...
Problem
Given a string containing only digits, restore it by returning all possible valid IP address combinations.
Example
Given "25525522235",
return ["255.255.222.35", "255.255.22.235"]. (Orde ...
Problem
Return the number of times that the string "code" appears anywhere in the given string, except we'll accept any letter for the 'd', so "cope" and "cooe" count.
Example
solution('aaacodebbb ...
Implement wildcard pattern matching with support for '?' and '*'.
'?' : Matches any single character.
'*' : Matches any sequence of characters (including the empty sequence).
The matching should cov ...
Text with a maximum of 100 characters will be given. Convert upper case letters to lower case letters and lower case letters to upper case letters.
Example Solution
Let string str equal to "coDeLAp ...