String Interview Questions

String Interview Questions

String is the sequence/collection of characters which can be stored in the variable of type String in almost all of the programming languages. String manipulation is very important part of day to day activity while writing code of a software. Technical questions based on strings are one of the favourite category asked by product based companies like Amazon, Google, Cisco, Intuit, NetApp, SAP, Oracle, Intel, EMC, Visa, IBM, Flipkart and also various startups. Following interview questions are good collection which will help you to practice and improve the algorithmic approach to solve string questions.   

Repeating character

Concatenation of two strings

Reverse a String

Remove duplicates from a string

Palindrome String

Sorting the array of strings

Remove characters from first string which are in second

Print Reverse of a string (Recursion)

Divide a string in N equal parts

The smallest window in a string containing all characters of another string

Reverse words in a given string

Given a string find its first non-repeating character

A Program to check if strings are rotations of each other or not

Print all duplicates in the input string

Print all interleavings of given two strings

Check whether two strings are anagram of each other

Write a program to print all permutations of a given string

List items containing all characters of a given word

Run length encoding

Print all permutations with repetition

Given string is interleaving of two other strings or not

Longest Palindromic Substring

wildcard character matching

Remove 'b' and 'ac' from a given string

Recursively remove all adjacent duplicates

Sort an array of strings

Check if a given string is a rotation of a palindrome

Find the second most frequent character

Print all pair of anagrams in a given array of strings

Remove spaces from a string

Lexicographic rank of string

Print all anagrams together in a sequence of words

Count the number of words

String(represents an integer) to value

Palindromes in a given range

Check rearranged string can form a palindrome

print all palindromic partitions

Minimum insertions to form a shortest palindrome

Print string of odd length in 'X' format

Transform one string to another using minimum number of given operations

Shortest Superstring Problem

Print all possible words from phone digits

Palindrome string (number)

Number of sub-strings which recursively add up to 9

Rotate string to get lexicographically minimum string

Print Longest common subsequence

Recursive function to do substring search

Reverse a string without affecting special characters

Recursive Implementation of atoi()

Program to add two binary digits

Length of longest valid substring

Check if two given strings are isomorphic to each other

Online algorithm for checking palindrome in a stream

Recursively print all the sentences that can be formed from list of word lists

Remove recurring digits in a given number

Find First non-repeating character in a string

Convert string1 to string2 in one edit

1`s and 2`s complement of binary number

Split a string

Palindrome permutations of a string

Repeated subsequence of length 2 or more

PANGRAM CHECK

Longest Common Extension

Removing spaces from a string using stringstream

Count number of substrings with k distinct characaters

Change gender of a given string

Remove Extra Spaces from a string

Print shortest path to print a string on screen

Longest Common Prefix (Using Biary Search)

Lower Case To Upper Case

Longest Common Prefix (Using Divide and Conquer)

Calculate sum of all numbers present in a string

Permutations (STL)

Longest common prefix (Character by character)

Longest common prefix (word by word)

Longest palindrome can be formed by removing or rearranging characters

Perfect reversible string

Longest common subsequence withpermutations

Caesar Cipher

Print all possible ways to break a string in bracket form

Generate all binary strings from given pattern

Remove minimum characters so that two strings become anagrams

Compare two version numbers

Kth Non-repeating character

Nth character in Concatenated Decimal string

Convert a string that is repetition of a substring of length k

Minimum characters to be added at front to make string palindrome

Count of character pairs at same distance as in english alphabets

Print all palindromic partitions of a string

Minimum number of characters to be removed to make a binary string alternate

Recursive Palindrome check

Reverse string without temporary variable

Can be split into four distinct strings

Even sub-string count

Check if string follows order of characters by a pattern or not

Smallest palindrome after replacement

Check if string can become empty by recursively deleting given sub-string

Sort a string according to another string

Check if all rows of a matrix are circular rotations of each other

Generate all binary strings without consecutive 1's

Check length of a string is equal to the number appended at its last

Program to toggle all characters in a string

Check whether strings are k distance apart or not


Next >
Scroll to Top