String Manipulation Interview Questions
- 0of 0 votes
AnswersGiven a string "amazon.com", print the alphabet in the string with their respective counts.
- Hari January 19, 2010
ex: a-2, m-1, o-2 etc.
Note: These questions were asked just to screen out non-eligible candidates and not during any phone interview or at onsite(are u kidding me :))| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer String Manipulation - 1of 1 vote
AnswersWrite a program to reverse a string using recursion?
- emma December 25, 2009| Report Duplicate | Flag | PURGE
Sonoa Systems Testing / Quality Assurance String Manipulation - 0of 0 votes
AnswersFind the FIRST non-repeating character in a string.
- duskandawn December 23, 2009
Ans: I gave the hash function solution, but interviewer wanted a O(1) space complexity and O(n) runtime complexity.
So any other solution with O(1) ?| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersWrite a function to reverse the words in a string (“cat and dog” becomes “tac dna god”). Please do not use any string manipulation functions that you do not implement yourself.
- luke December 11, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer String Manipulation Algorithm - 0of 0 votes
AnswersGiven a sentence reverse words of the sentence.
- Vaishnavi December 04, 2009
I am a fool
to
I ma a loof| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersGiven a sentence containing anagrams, find the anagram pair and print it as <cat,tac> types
- Vaishnavi December 04, 2009| Report Duplicate | Flag | PURGE
Flipkart Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersWrite code to check if a string contains a substring.
- Anonymous November 26, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer String Manipulation - 1of 1 vote
AnswersGive an algorithm to find whether 2 given strings are ANAGRAMS or not. Write test cases.
- Hari November 13, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test String Manipulation - 2of 2 votes
Answersfind the longest palindrome in a string?
- handiaya November 09, 2009| Report Duplicate | Flag | PURGE
Microsoft Amazon Software Engineer / Developer Algorithm Arrays C++ Coding String Manipulation C - 1of 1 vote
AnswersDevice a function that removes the occurences of blank spaces from a string. Constraints: run in linear time and the algorithm must be in-place. For example if,
- DesiGrad October 21, 2009
string = Hi there wassup
output = Hitherewassup| Report Duplicate | Flag | PURGE
Qualcomm Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersFor a given string of size n, check whether it forms a palindrome or not by using the letter in the string.
- pavan October 13, 2009| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test String Manipulation - 0of 0 votes
AnswersWrite code to print all combinations of a string
- Good Luck October 12, 2009| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersWrite code to reverse a string. Optimize it.
- Good Luck October 12, 2009| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersInput: a string. If the input matched the pattern: x="y", return y else return an error.
- Anonymous October 08, 2009
Write test cases.
Some hints: think about a state machine.
We also had a discussion on how to best return an error (error code, exception, error object)| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test String Manipulation - 0of 0 votes
AnswersRemove duplicates from a string. Write test cases.
- Anonymous October 08, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test String Manipulation - 0of 0 votes
AnswersGiven two arrays of chars, find the longest common substring.
- SK October 01, 2009| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersWrite code to reverse a string.
- SK October 01, 2009| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersConvert date from mmddyy to words
- Anon August 27, 2009| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersWrite a function that removes extra spaces from a string and leaves only one correct space. I got it right the first time so they changed and twisted it a lot.
- fuckubloomberg July 26, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer String Manipulation - 0of 0 votes
AnswersWrite a function to print out misspelled words from a string containing many words.
- fuckubloomberg July 26, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer String Manipulation - 0of 0 votes
AnswersWrite the strstr function, using of any system string fucntions such as strlen was prevented
- BayE June 28, 2009| Report Duplicate | Flag | PURGE
Qualcomm Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersGiven a sample string, say
- Ankit June 24, 2009
String s = "This is a test string "
The idea is to remove or squueze all the extra spaces to a single space. Condition: The process should permanently change the string and not simply print the string character by character by ignoring extra spaces.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersWhat is the difference between string and stringbuilder? When would you use each?
- Jackie June 23, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test String Manipulation - 0of 0 votes
Answerscode to replace multiple spaces in string with a single space.
- ez pz March 20, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Amazon Financial Software Developer Software Engineer / Developer String Manipulation - 0of 0 votes
AnswersWrite a program to reverse a string and use it as a subroutine to reverse each word in a line
- Devil170 February 28, 2009| Report Duplicate | Flag | PURGE
Facebook String Manipulation - 0of 0 votes
AnswersHow would you implement a string matching algorithm that supports partial match and also outputs a score for each match?
- string matching with matching score February 23, 2009| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer String Manipulation - 1of 0 votes
Answerswhat is the drawback of strcpy,how can the drawback be fixed
- Nimmo January 08, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer String Manipulation