## Interchanging first and second halves of stings

Given two strings and . Create two new strings by exchanging the first half and second half of one of the strings with the first… Read More »

- Number of substrings that start with "geeks" and end with "for"
- Count number of substrings of a string consisting of same characters
- Program to duplicate Vowels in String
- Count all substrings having character K
- Lexicographically smallest string of length N and sum K
- Compare two strings considering only alphanumeric characters
- Minimum given operations required to convert a given binary string to all 1's
- Check duplicates in a stream of strings
- Queries for rotation and Kth character of the given string in constant time
- Minimum number of substrings the given string can be splitted into that satisfy the given conditions
- Check if string can be rearranged so that every Odd length Substring is Palindrome
- Print characters having even frequencies in order of occurrence
- How to Append a Character to a String in C
- Minimum cost to convert str1 to str2 with the given operations
- Reverse the given string in the range [L, R]
- Modulo of a large Binary String
- Check if expression contains redundant bracket or not | Set 2
- Reverse every word of the string except the first and the last character
- Count number of binary strings such that there is no substring of length greater than or equal to 3 with all 1's
- Largest substring of str2 which is a prefix of str1
- Find the character made by adding all the characters of the given string
- Find the occurrence of the given binary pattern in the binary representation of the array elements
- Print characters in decreasing order of frequency
- Longest substring such that no three consecutive characters are same
- Sort groups of numbers and characters separately in a String
- Expand the string according to the given conditions
- Find the number of strings formed using distinct characters of a given string
- Lexicographical ordering using Heap Sort
- Program to Encrypt a String using ! and @
- Concatenate the strings in an order which maximises the occurrence of subsequence "ab"

Given two strings and . Create two new strings by exchanging the first half and second half of one of the strings with the first… Read More »

Given two strings ‘a’ and ‘b’ and a number k, our aim is to merge the strings into a string s such that it contains… Read More »

Given a string S. Print the lexicographically smallest string possible. You can make minimal changes to the characters in the string and you can permute… Read More »

Given a string calculate length of the string using recursion. Examples: Input : str = “abcd” Output :4 Input : str = “GEEKSFORGEEKS” Output :13… Read More »

Given a positive integer number n generate all the binary number from 0 to n. Examples: Input : 5 Output : 0 1 10 11… Read More »

Given a sequence, find the length of the longest palindromic subsequence in it. Examples: Input : abbaab Output : 4 Input : geeksforgeeks Output :… Read More »

Given a string, count total number of consonants in it. A consonant is a English alphabet character that is not vowel (a, e, i, o… Read More »

Given a 2-Dimensional character array and a string, we need to find the given string in 2-dimensional character array such that individual characters can be… Read More »

Given two strings contains three characters i.e ‘A’, ‘B ‘and ‘#’ only. Check is it possible to convert first string into another string by performing… Read More »

Given a non-negative integer n. The problem is to check if binary representation of n is palindrome or not. Note that the actual binary representation… Read More »

Given two strings S and T. Find the positions of two letters to be swapped in S so that the hamming distance between strings S… Read More »

Find the smallest number such that the sum of its digits is N and it is divisible by . Examples : Input : N =… Read More »

Given two strings X and Y, we need to convert string X into an anagram of string Y with minimum replacements. If we have multiple… Read More »

Given a string of length n and a non-negative integer k. Find k distant string of given string. Distance between two letters is difference between… Read More »

Earlier we have discussed on how to check if both halves of the string have same set of characters. Now, we further extend our problem… Read More »