Given the string, we have to remove the ith indexed character from the string.
In any string, indexing always start from 0. Suppose we have a string geeks then its indexing will be as –
g e e k s 0 1 2 3 4
Input : Geek i = 1 Output : Gek Input : Peter i = 4 Output : Pete
Approach : From the given string, i-th indexed element has to be removed. So, Split the string into two halves, before indexed character and after indexed character. Return the merged string.
Below is the implementation of above approach :
- Character replacement after removing duplicates from a string
- Minimize the length of string by removing occurrence of only one character
- Lexicographically smallest string formed by removing at most one character
- Minimum sum of squares of character counts in a given string after removing k characters
- Python | Program to check if a string contains any special character
- Ways to remove i'th character from string in Python
- Java Program to get a character from a String
- Program to count occurrence of a given character in a string
- Generate two output strings depending upon occurrence of character in input string in Python
- Python program to find the most occurring character and its count
- Java program to count the occurrence of each character in a string using Hashmap
- Find a string such that every character is lexicographically greater than its immediate next character
- Replace every character of string by character whose ASCII value is K times more than it
- Removing punctuations from a given string
- Replace every character of a string by a different character
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.