# Category Archives: Strings

Questions related to strings

## Amazon Interview Experience | Set 389 (On -Campus for Full Time)

Online Coding Round: Time: 1.5 hr Questions Format: 20 MCQs + 2 Coding Questions MCQs were based on Data Structures, Operating systems etc. Coding Questions:… Read More »

## Given two strings check which string makes a palindrome first

Given two strings ‘A’ and ‘B’ of equal length. Two players play a game where they both pick a character from their respective strings (First… Read More »

## Goldman Sachs Interview Experience | Set 31 (For Internship)

Goldman Sachs These are the CS questions asked in the written round of GS in this year’s campus internship. There are 36 horses. We have… Read More »

## Yatra.com Interview Experience | Set 7

Question 1 Given a list of strings, where each string is composed of different combinations of (, ), {, }, [, ]. Verify the validity… Read More »

## Print characters and their frequencies in order of occurrence

Given a string str containing only lowercase characters. The problem is to print the characters along with their frequency in the order of their occurrence… Read More »

## Evaluate a boolean expression represented as string

Given a string consisting of only 0, 1, A, B, C where A = AND B = OR C = XOR Calculate the value of… Read More »

## Microsoft Interview Experience | Set 129 (On-Campus for Internship)

Written Test: There were three easy questions. Complete a function that takes two integer x and y. you have to return x+y if numbers of… Read More »

## Find if an array contains a string with one mismatch

Given a string and array of strings, find whether the array contains a string with one character difference from the given string. Array may contain… Read More »

## Efficiently find first repeated character in a string without using any additional data structure in one traversal

Implement a space efficient algorithm to check First repeated character in a string without using any additional data structure in one traversal. Use additional data… Read More »

## Print the longest common substring

Given two strings ‘X’ and ‘Y’, print the length of the longest common substring. If two or more substrings have the same value for longest… Read More »

## Roll the characters of string

Given a string s and an array roll where roll[i] represents rolling first roll[i] characters in string. We need to apply every roll[i] on string… Read More »

## Print all possible strings that can be made by placing spaces

Given a string you need to print all possible strings that can be made by placing spaces (zero or one) in between them Examples :… Read More »

## Find the first repeated word in a string

Given a string, Find the 1st repeated word in a string Examples: Input : “Ravi had been saying that he had been there” Output :… Read More »

## Goldman Sachs Interview Experience | Set 29 (For Internship)

Recently Goldman Sachs came to our campus to recruit FTEs and interns. All students from Circuit Branches were eligible to apply. I will write about… Read More »

## Lexicographic rank of a string using STL

You are given a string, find its rank among all its permutations sorted lexicographically. Examples: Input : str[] = “acb” Output : Rank = 2… Read More »