Skip to content

Tag Archives: substring

Jaro Similarity Jaro Similarity is the measure of similarity between two strings. The value of Jaro distance ranges from 0 to 1. where 1 means… Read More
Given a space-separated string str, the task is to find the first substring whose reverse is a word in the string. All the characters of… Read More
Given string str of length L and an integer N, the task is to form a total of (L / N) contiguous subsegments of the… Read More
Given binary string str of length N, the task is to find the count of substrings of str which are divisible by 2. Leading zeros… Read More
Given a binary string S of length N and an integer K, the task is to find the smallest non-zero sub-string of S that can… Read More
Given a string str and an integer K, the task is to print the length of the longest possible substring that has exactly K unique… Read More
Given binary string str of length N, the task is to find the longest sub-string divisible by 2. If no such sub-string exists then print… Read More
Given a string str that consists of lower case English letters and brackets. The task is to reverse the substrings in each pair of matching… Read More
Given a binary string str of length N, the task is to find the maximum count of consecutive substrings str can be divided into such… Read More
Given a string str, the task is to check whether all the substrings of length ≥ 2 have the number of vowels at least as… Read More
Given string str of length N and Q queries where every query consists of two integers L and R. For every query, the task is… Read More
Given a string S, the task is to find the number of ways to divide/partition the given string in sub-strings S1, S2, S3, …, Sk… Read More
Given two strings str1 and str2, the task is to find the maximum number of times str1 occurs in str2 as a non-overlapping substring after… Read More
Given a string str and a string array arr[], the task is to find the minimum count of substrings this can be split into such… Read More
Given an integer N, the task is to count the number of binary strings possible of length N such that they don’t contain “111” as… Read More