US Interview Questions
- -1of 1 vote
AnswersGiven an array of lower case strings, the task is to find the number of strings that are distinct.
- boony August 09, 2018 in United States
Two strings are distinct if they can be made equivalent by performing some operations on one or both string
swapEven : swap a character at an even-numbered index with a character at another even-numbered index
swapOdd : swap a character at an odd-numbered index with a character at another odd-numbered index
Input : arr = {"abcd", "cbad", "bacd"}
Output : 2
The 2nd string can be converted to the 1st by swapping
the first and third characters. So there are 2 distinct
strings as the third string cannot be converted to the
first.
string input[] = {"abcd", "acbd", "adcb", "cdba",
"bcda", "badc"};
ans =4| Report Duplicate | Flag | PURGE
US Software Engineer - -1of 1 vote
AnswersHow to use Facebook Messenger?
- Facebook Tech Support November 14, 2017 in United States| Report Duplicate | Flag | PURGE
US techsupport - 0of 0 votes
AnswersAre you Know Our Pogo Technical Support Number 1-888-490-3144?
- pgamesupnum123 March 04, 2017 in United States for Technical Expert| Report Duplicate | Flag | PURGE
US - -2of 2 votes
AnswersMSN Customer Service | Support Phone Number
- kiteross170290 October 08, 2016 in United States for Customer Service
Site : http://solvebe.webs.com/msn-customer-service| Report Duplicate | Flag | PURGE
US Tech Lead Experience - 0of 0 votes
AnswerThe last one, he gave me one single line : " amazon is a . blah blah blah.." then he told me to compress it.
- darpanshah08 March 24, 2015 in United States for Amazon Prime
I used the indexes,occurences. But then he told me to use other way. after he gave me some hint, I was able to find out the palindrome pattern. we can use that too to compress the string.
Then he told me to write algorithm for palindrome, I wrote with O(n/2) complexity. then he told me to find any longest palindrome from the string. I need to use my palindrome algorithm too.
I tried a lot and then I came up with O(n^3) solutions. he pushed me to try to reduce with O(n^2) solution. However, I could not come up with that solution.| Report Duplicate | Flag | PURGE
US Software Engineer - 0of 0 votes
AnswersBased on the above question, he asked me that I have a very large file with all the details of product, like id, name, qty_sold, date. then he told me to find out the products that will have a better chances to be sold out next week. I have to find out the products that will sell more in next week.
- darpanshah08 March 24, 2015 in United States for Amazon Prime| Report Duplicate | Flag | PURGE
US Software Engineer - 0of 0 votes
AnswersSecond round was intersting: that guy gave me a situation, like I have a file with columns product_id, qty, date, product_name.
- darpanshah08 March 24, 2015 in United States for Amazon Prime
I need to sort them based on qty that has been sold out on day. For example, this product has been sold highest on this day.| Report Duplicate | Flag | PURGE
US Software Engineer Algorithm Hash Table - 0of 0 votes
AnswersIn my First round, very first question that guy asked me is to generate an algorithm to check whether string is palindrome or not. After that in the same round, he asked me to create a class that duplicates the Stack property.
First, String Palindrome:
Used stringbuilder, i.e.StringBuilder sb = new StringBuilder(str); System.out.println(sb.reverse());
then he told me to not to use StringBuilder, so i convert string into the char array, then apply loop till half the size of the string. and check character by character. He said ok. "looks good".
- darpanshah08 March 24, 2015 in United States for Amazon Prime| Report Duplicate | Flag | PURGE
US Software Engineer Stacks String Manipulation - 0of 0 votes
AnswersA hotel manager has to process n advance bookings of rooms for the next season. His hotel has k identifical rooms. Bookings contain
- heliojunior@bct.ect.ufrn.br September 01, 2014 in United States
an arrival date and a departure date. He wants fo find out whether there are enough rooms in the hotel to satify the demand.
Design an algorithm that solves this problem in time O(n logn) . Hint:Consider the set off all arrivals and departures .
Sort the set and process it in sorted order.
Made in Merge Sort| Report Duplicate | Flag | PURGE
US Computer Scientist Algorithm