Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Graph Strings DFS

Find if an array of strings can be chained to form a circle Set 2

Given an array of strings, find if the given strings can be chained to form a circle. A string X can be put before another string Y in circle if the last character o...
Graph Strings Accolite

Find if an array of strings can be chained to form a circle Set 1

Given an array of strings, find if the given strings can be chained to form a circle. A string X can be put before another string Y in circle if the last character o...
Hash Strings Hash

Return maximum occurring character in an input string

Write an efficient function to return maximum occurring character in the input string e.g., if input string is “test” then function should return &#x20...
Hash Strings Hash

Group Shifted String

Given an array of strings (all lowercase letters), the task is to group them in such a way that all strings in a group are shifted versions of each other. Two string ...
Hash Strings Hash

Count Substrings with equal number of 0s, 1s and 2s

Given a string which consists of only 0s, 1s or 2s, count the number of substrings that have equal number of 0s, 1s and 2s. Examples: Input : str = “0102010&...
Hash Strings palindrome

Palindrome Substring Queries

Given a string and several queries on the substrings of the given input string to check whether the substring is a palindrome or not. Examples : Suppose our input st...
Greedy Heap Strings

Rearrange characters in a string such that no two adjacent are same

Given a string with repeated characters, task is rearrange characters in a string so that no two adjacent characters are same. Note : It may be assumed that the strin...
Misc Queue Strings

Minimum sum of squares of character counts in a given string after removing k characters

Given a string of lowercase alphabets and a number k, the task is to print the minimum value of the string after removal of ‘k’ characters. The value o...
Stack Strings Strings

Find maximum depth of nested parenthesis in a string

We are given a string having parenthesis like below      “( ((X)) (((Y))) )” We need to find the maximum depth of balanced parenthe...
Dynamic Programming Queue Stack

Length of the longest valid substring

Given a string consisting of opening and closing parenthesis, find length of the longest valid parenthesis substring. Examples: Input : ((() Output : 2 Explanation : ...

Subscribe to Our Newsletter