Given a numeric string, the task is to split the string into the sequence of two or more positive integers and check that it satisfies the following conditions or not. 1. Each Read more →
Strings
19 postsA string is called happy if it does not have any of the strings ‘aaa’, ‘bbb’ or ‘ccc’ as a substring. Given three integers a, b and c, return any string s, Read more →
Given a string of length, N finds the minimum number of characters needed to delete to make right and left shift of the remaining string equal. Examples : Input : str: "36363636" Read more →
Given a string s, the task is to print all permutations of a string that are in ascending order, i.e., their characters are in ascending order. Examples: Input: Cplusplus Output: Cllppssuu Out Read more →
Given a string S of size N, the task is to sort the string without changing the place of vowels. Examples: Input: S = "example" Output: elampxe Explanation: The consonants are xmpl. Read more →
Given a binary string consisting of ‘0’ & ‘1’. You can remove any subsequence in given string but can’t pick adjacent indices. Print “POSSIBLE” if string can be sorted else print “NOTPOSSIBLE”. Read more →
You are given n strings. You have to print them in lexicographical increasing order. Also, ensure that all of the strings should be distinct. Examples: Input: {"Aarav", "Arjun", "Rahul", "Rishabh", "Kunal"} Output: Read more →
Given an array arr[] of N dates in the form of “dd-mm-yyyy”, the task is to sort these dates in ascending order. Examples: Input: arr[] = { "25-08-1996", "03-08-1970", "09-04-1994" } Output: Read more →
Given an array arr[] of N strings, the task is to sort these strings according to the numbers of matches required to represent them. Examples: Input: arr[] = { "123", "46", "8", Read more →
You are given two strings string1 and string2. Your task is to find length of longest consecutive occurrences of second string that occurs in first string. Examples: Input: string1="AAACBBAAAA", string2="A" Output: 4 Read more →