Given two strings str1 and str2, write a function that prints all interleavings of the given two strings. You may assume that all characters in both strings are different
Given a string of length n, print all permutation of the given string. Repetition of characters is allowed. Print these permutations in lexicographically sorted order
Given two strings string1 and string2, find the smallest substring in string1 containing all characters of string2 efficiently. For Example: Input : string = “this is a test string” pattern = “tist” Output : Minimum window is “t stri” Explanation: “t stri” contains all the characters of pattern. Input : string = “geeksforgeeks” pattern =… Read More »
Given an input string, write a function that returns the Run Length Encoded string for the input string.
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i” Examples : Input : s = “geeks quiz practice code” Output : s = “code practice quiz geeks” Input : s = “getting good at coding needs a lot of… Read More »
There is a list of items. Given a specific word, e.g., “sun”, print out all the items in list which contain all the characters of “sun”.
Given a string, find the first non-repeating character in it. For example, if the input string is “GeeksforGeeks”, then output should be ‘f’ and if input string is “GeeksQuiz”, then output should be ‘G’.
Difficulty Level: Rookie Question: Write a program to print N equal parts of a given string.
A permutation, also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S itself. A string of length n has n! permutation.
Write a recursive C function to print reverse of a given string.
Given a string s1 and a string s2, write a snippet to say whether s2 is a rotation of s1 using only one call to strstr routine? (eg given s1 = ABCD and s2 = CDAB, return true, given s1 = ABCD, and s2 = ACBD , return false) Algorithm: areRotations(str1, str2) 1. Create a… Read More »