## Map function and Lambda expression in Python to replace characters

Given a string S, c1 and c2. Replace character c1 with c2 and c2 with c1. Examples: Input : str = ‘grrksfoegrrks’ c1 = e,… Read More »

- Repeated Character Whose First Appearance is Leftmost
- Convert character array to string in C++
- Count substrings that contain all vowels | SET 2
- Find the longest string that can be made up of other strings from the array
- Minimum number of times A has to be repeated such that B is a substring of it
- Count of integers of length N and value less than K such that they contain digits only from the given set
- Java program to check whether a string is a Palindrome
- Minimum number of adjacent swaps to convert a string into its given anagram
- Check for balanced parentheses in an expression | O(1) space | O(N^2) time complexity
- Check whether two strings contain same characters in same order
- Rearrange characters in a string such that no two adjacent are same using hashing
- Generate all permutations of a string that follow given constraints
- Distinct palindromic sub-strings of the given string using Dynamic Programming
- Program to generate all possible valid IP addresses from given string | Set 2
- Maximize the happiness of the groups on the Trip
- Implement a Dictionary using Trie
- InfyTQ 2019 : Find the position from where the parenthesis is not balanced
- Check if a string can be obtained by rotating another string d places
- Minimum rotations required to get the same String | Set-2
- C++ program to compare two Strings using Operator Overloading
- Count of substrings which contains a given character K times
- Append a digit in the end to make the number equal to the length of the remaining string
- Count the pairs of vowels in the given string
- Minimum number of sub-strings of a string such that all are power of 5
- Reverse individual words with O(1) extra space
- Find uncommon characters of the two strings | Set 2
- Persistent Trie | Set 1 (Introduction)
- Total number of odd length palindrome sub-sequence around each centre
- Largest substring with same Characters
- Optimally accommodate 0s and 1s from a Binary String into K buckets

Given a string S, c1 and c2. Replace character c1 with c2 and c2 with c1. Examples: Input : str = ‘grrksfoegrrks’ c1 = e,… Read More »

Given a 26 letter character set, which is equivalent to character set of English alphabet i.e. (abcd….xyz) and act as a relation. We are also… Read More »

Given a string s and a positive integer k. You need to encrypt the given string such that each substring of size k is represent… Read More »

Given a number N and its radix base R, find whether its valid or not according to its radix base. Find valid/invalid number for any… Read More »

Given two strings ‘X’ and ‘Y’, print the longest common sub-string. Examples: Input : X = “GeeksforGeeks”, Y = “GeeksQuiz” Output : Geeks Input :… Read More »

Given a robot which can only move in four directions, UP(U), DOWN(D), LEFT(L), RIGHT(R). Given a string consisting of instructions to move. Output the coordinates… Read More »

Given a very large number N, we need to count the total ways such that if we divide the number into two parts a and… Read More »

Given two strings A and B. The task is to count the number of ways to insert a character in string A to increase the… Read More »

ASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII code is the numerical representation of a character… Read More »

Given a name, print the initials of a name(uppercase) with last name(with first alphabet in uppercase) written in full separated by dots. Examples: Input :… Read More »

Given two strings, find if we can make first string from second by deleting some characters from second and rearranging remaining characters. Examples: Input :… Read More »

Given a string str and a character x, find last index of x in str. Examples : Input : str = “geeks”, x = ‘e’… Read More »

Given a string S, c1 and c2. Replace character c1 with c2 and c2 with c1. Examples: Input : grrksfoegrrks, c1 = e, c2 =… Read More »

Given a binary string of 0s and 1s. The task is to find the length of substring which is having maximum difference of number of… Read More »

Given a text and a wildcard pattern, implement wildcard pattern matching algorithm that finds if wildcard pattern is matched with text. The matching should cover… Read More »