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).
Luhn is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers. Below is how this algorithm works:
From the rightmost digit, which is the check d ...
You have an enormous book collection and want to buy some shelves. You go to a store and they sell all kinds of shelves. The weird part is, some shelves are different in length but they all cost the ...
Write an algorithm to compare two strings. Check if they are equal or not. If equal return True. Else False.
Example
If string1 is "codela" and string2 is "cdl" output return must be False.
Write an algorithm to delete vowels from a string.
Given a string. You need to delete vowels of this string and return string.
Example
If string is "codela", return must be "cdl".
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 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 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 ...
Consider a coding system for alphabets to integers where ‘a’, ‘b’, ..., ‘z’ are represented as 1, 2, ..., 26. Given a string of digits 1..9 as input, write a function that prints all valid interpre ...