Software Engineer / Developer Interview Questions
- 3of 3 votes
AnswersYou have three jars filled with candies. One jar is filled with banana candies, one jar is filled with lemon candies and one jar has a mix of both. All the jars are mislabelled (i.e. all the jars have wrong labels about what kind of candies they contain).
- rpisid November 14, 2013 in United States
All the candies look very similar in shape, size and color and they even smell the same. The only way to distinguish them is by tasting.
You have to eat one and only one candy to determine the correct jar labels. You can eat that one candy from any jar you want as long as you eat only one in total.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Brain Teasers - 3of 3 votes
Answerswhen we have to override equals and hashcode in java..?
- PRASHANTGAURAV November 12, 2013 in India
what will happened if you dont override .. Explain with program.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Java - 4of 4 votes
AnswersGiven an integer array. Perform circular right shift by n.
- wolfengineer November 09, 2013 in United States
Give the best solution.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Arrays - 0of 2 votes
AnswersYou are given a List containing all the Symbols of the periodic table.
- init.d November 09, 2013 in United States
You are also given a List containing all the words in the English dictionary.
How do you find the longest word that can be made using symbols of the periodic table?
Note: Symbols can be 1 or 2 chars long (for eg. O => oxygen, Fe => Iron)| Report Duplicate | Flag | PURGE
Ebay Software Engineer / Developer Algorithm - 4of 4 votes
AnswersGiven two (dictionary) words as Strings, determine if they are isomorphic. Two words are called isomorphic
- yashas.mavinkere November 07, 2013 in United States for Application
if the letters in one word can be remapped to get the second word. Remapping a letter means replacing all
occurrences of it with another letter while the ordering of the letters remains unchanged. No two letters
may map to the same letter, but a letter may map to itself.
Example:
given "foo", "app"; returns true
we can map 'f' -> 'a' and 'o' -> 'p'
given "bar", "foo"; returns false
we can't map both 'a' and 'r' to 'o'
given "turtle", "tletur"; returns true
we can map 't' -> 't', 'u' -> 'l', 'r' -> 'e', 'l' -> 'u', 'e' -'r'
given "ab", "ca"; returns true
we can map 'a' -> 'c', 'b'| Report Duplicate | Flag | PURGE
Linkedin Software Engineer / Developer Data Structures - -1of 1 vote
AnswersWrite a method that takes a string, in this format "aabbaadddc". Encode the string by counting the consecutive letters. Ex: "a2b2a2d3c1"
- unicorn November 07, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - -1of 1 vote
AnswersExplain Binary Search Tree. What is its time complexity?
- unicorn November 07, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Sorting - -1of 1 vote
AnswersWhat is a hash table? Explain how they work (hash function and buckets).
- unicorn November 07, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Hash Table - -1of 1 vote
AnswersComplexity of a function:
- ritujain86 November 05, 2013 in United States for Autopilot
int func_fibonacci ( int n) {
if (n < 2) {
return n;
} else {
return ( func_fibonacci(n-1) + func_fibonacci(n-2));
}
}| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersThere is a matrix of very large dimension (10^30 * 10*40) of characters. You need to search a string of length 10^10 inside the matrix. Adjacent characters in any direction can be chosen and same cell can be counted multiple times to find the pattern
- Lunatic November 05, 2013 in India| Report Duplicate | Flag | PURGE
Walmart Labs Software Engineer / Developer Algorithm - 6of 6 votes
AnswersYou visited a list of places recently, but you do not remember the
- UserOne November 05, 2013 in United States
order in which you visited them. You have with you the airplane
tickets that you used for travelling. Each ticket contains just the
start location and the end location. Can you reconstruct your journey?| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm - 0of 0 votes
AnswersCampus Interview question:
- init.d November 04, 2013 in United States
Q: What is the difference between a HashMap and HashTable?
A: HashTable is always synchronized - undesirable - HashMap is better
Q: How is ConcurrentHashMap different from Collections.tosynchronized(map)?
A: First locks individual rows the second locks whole structure| Report Duplicate | Flag | PURGE
Groupon Software Engineer / Developer - 1of 1 vote
AnswersCampus Interview question:
- init.d November 04, 2013 in United States
Design the File System for an OS.| Report Duplicate | Flag | PURGE
Groupon Software Engineer / Developer General Questions and Comments - 1of 1 vote
AnswersCampus Interview question:
- init.d November 04, 2013 in United States
Search for an element in a rotated sorted array for eg. sorted: {1, 2, 3, 4, 5, 6} rotated: {5, 6, 1, 2, 3, 4}| Report Duplicate | Flag | PURGE
Groupon Software Engineer / Developer Algorithm - 0of 0 votes
AnswersCampus Interview question:
- init.d November 04, 2013 in United States
Find the top k items out of an array where items can have values [0... 100]| Report Duplicate | Flag | PURGE
Groupon Software Engineer / Developer Algorithm - 6of 6 votes
AnswersWrite a function for retrieving the total number of substring palindromes.
- Andrew November 04, 2013 in United States
For example the input is 'abba' then the possible palindromes= a, b, b, a, bb, abba
So the result is 6.
Updated at 11/11/2013:
After the interview I got know that the O(n^3) solution is not enough to go to the next round. It would have been better to know before starting implementing the solution unnecessarily ...| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Algorithm - -6of 8 votes
AnswersGiven two Btrees. these trees "may" have right and left branches swapped. Now compare it
- Bee November 03, 2013 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Trees and Graphs - 1of 1 vote
AnswersFind number of palindromes in a string
- Omar.Enayet November 02, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 6 votes
AnswersGiven a set of n points (coordinate in 2d plane) within a rectangular space, find out a line (ax+by=c), from which the sum of the perpendicular distances of all the points will be minimum. This can has a general usecase like, in a village there are few house, you have to lay a road, such that sum of all the approach roads from each house will be minimum.
- amukh November 02, 2013 in United States| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Algorithm - 2of 2 votes
AnswersGiven a matrix M with (with positive or negative numbers) find the largest sum S of any sub-matrix of M.
- Omar.Enayet November 02, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 1of 1 vote
AnswersFind the length of the longest palindrome in a string
- Omar.Enayet November 02, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - -3of 5 votes
AnswersSolve the given equation in one variable 'x'. The equation will be either linear of quadratic, i.e. the maximum degree of the equation will be 2. The usual precedence of the operation will hold true. There won't be any other operations apart from +, -, * and /. x will not present in the donominator, and only the elipse-shaped "()" brackets can exist in a given test. The constant in the equation will be smaller than 1000. We can not ignore the * operation.
- Rahul November 01, 2013 in India
Sample Input
1> x + 3 * 5 = 80
2> (x-3)*(x+4) = 0
3> x * (2 * x - 3) + x / 3 = x / 3 - 1
Output
1> 65
2> -4 and 3
3> 0.5 and 1.0| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 1of 1 vote
AnswersFind numbers which are palindromic in both their decimal and octal representations
- geekofthegeeks November 01, 2013 in India| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm - 0of 0 votes
AnswersDesign remote controller for me.
- cccorez October 30, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersGiven a string, write a function to determine if the string is a palindrome ignoring spaces. Your code should run optimally in a memory-constrained environment.
- kool.human October 30, 2013 in United States
eg "ABBA" = true
" ABB A" = true
"ABXA" = false
" ABBXBAB" = false| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 2 votes
AnswersDesign a function to gives real time statistics of your web traffic,count one day's website visit ,count one week's website visit
- catherin October 28, 2013 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Object Oriented Design - -2of 4 votes
Answersdifference between thread and process.
- shakib034 October 27, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Operating System - -4of 4 votes
Answersdesign an alarm clock for a deaf person.
- shakib034 October 27, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Brain Teasers - 0of 2 votes
Answers3 fruit baskets having apple, orange and mix. all labeled wrong. with only one sample taking from one basket but not peeking find out which basket has which one.
- shakib034 October 27, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Brain Teasers