Software Engineer / Developer Interview Questions
- 0of 0 votes
AnswersImplement bool isPalindrome(SingleLinkList *node) in constant Space.
- hprem991 October 11, 2014 in United States for Chennei
Sorry for incomplete post earlier..| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer C++ - 0of 0 votes
AnswersImplement bool regex() Function.
- hprem991 October 11, 2014 in India for Chennei| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer C++ Coding - 1of 1 vote
AnswersImplement bool isBST(Tree * root)
- hprem991 October 11, 2014 in India for Chennei| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer C++ Coding - 0of 0 votes
AnswerHi,
- CodeNinja October 10, 2014 in United States
Anyone here who has given the Amazon work style and personality test for the SDE/SDET position? If someone could shed some light on what exactly it is?| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Online Test - 0of 0 votes
AnswersHi,
- CodeNinja October 10, 2014 in United States
Anyone here who has given the Amazon work style and personality test for the SDE/SDET position? If someone could shed some light on what it is exactly?| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Online Test - 0of 0 votes
AnswersFind all the calendar events which are overlapping.
- abcd_win October 10, 2014 in India
Suppose there is event A: 10-15 Oct, B : 12-14 Oct , C:15-24 Oct, D: 23-34 Oct, E: 4-5 Oct
All events except E should be marked as overlapping as they overlap with some other event.| Report Duplicate | Flag | PURGE
Toppr Software Engineer / Developer Algorithm - 0of 0 votes
AnswersFind all the calender events which are overlapping.
- abcd_win October 10, 2014 in India
Suppose there is event A: 10-15 Oct, B : 12-14 Oct , C:15-24 Oct, D: 23-34 Oct, E: 4-5 Oct
All events except E should be marked as overlapping as they overlap with some other event.| Report Duplicate | Flag | PURGE
Toppr Software Engineer / Developer Algorithm - 3of 5 votes
AnswersYou're given an array of integers(eg [3,4,7,1,2,9,8]) Find the index of values that satisfy A+B = C + D, where A,B,C & D are integers values in the array.
- omair.ahmed08 October 09, 2014 in United States
Eg: Given [3,4,7,1,2,9,8] array
The following
3+7 = 1+ 9 satisfies A+B=C+D
so print (0,2,3,5)| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Algorithm Arrays Data Structures - 1of 3 votes
AnswersA Multi-threaded server application stops working and the last log message from the application is:
"Some Server Related Message..."
Code looks like:
CalledFunc () { Code ... Acquiring Thread lock Line printing "Some Server Related Message..." Func(); Releasing Thread Lock }
1. What should the programmer in charge do to debug this?
- joe.wynton October 07, 2014 in United States for Trading System
2. What has happened wrong in the Func()?
3. If an exception is thrown in the Func() what should be done to fix problem ?| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer C# C C++ Threads - 0of 0 votes
AnswersA Multi-threaded server application stops working and the last log message from the application is:
"Some Server Related Message..."
Code looks like:
CalledFunc () { Code ... Acquiring Thread lock Line printing "Some Server Related Message..." Func(); Releasing Thread Lock }
1. What should the programmer in charge do to debug this?
- joe.wynton October 07, 2014 in United States
2. What has happened wrong in the Func() ?
3. If an exception is thrown in the Func() what should be done to fix problem ?| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer C# C C++ Threads - 0of 0 votes
Answerscompare the time complexity of quick ,merge and bubble sort
- sujeet October 06, 2014 in India for n/a| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - -1of 1 vote
Answerspublic abstract class Session{ private Object objectId; //... other fields public abstract void processRequest(InputStream in); } public XmlSession implements Session{ public void processRequest(InputStream in){ System.out.println("XML RESPONSE"); // DO STUFF TO XML RESPONSE } } public JSonSession implements Session{ public void processRequest(InputStream in){ System.out.println("JSON RESPONSE"); // DO STUFF TO JSON RESPONSE } } public static void main(String args[]){ Session session = new XmlSession(); session.processRequest(); Session session = ....; session.processRequest(); }
I would like to change my design in a way that I will not lose the Session object and I don't change the client code that instanciate the XmlSession.
- shakesmove October 04, 2014 in Germany for Devoper
Could it be useful the prototype pattern? If yes why?| Report Duplicate | Flag | PURGE
Software Engineer / Developer Ideas - 0of 0 votes
AnswersGiven two classes C1 and C2 which are almost same.(remember not exactly same).
- NIC October 03, 2014 in India
You want to choose best among these classes so that it can be use as key in hashmap.
What question will you ask regarding two classes C1 and C2.| Report Duplicate | Flag | PURGE
makemytrip Software Engineer / Developer Java - 0of 0 votes
AnswersGiven a binary tree and a range as min and max.
- NIC October 03, 2014 in United States
Modify the tree such that number formed by traversing tree from root to leaf all fall in given range.
1
2 3
4 5 6 7
let say range is 125 - 136
Modified tree
1
2 3
null 5 6 null| Report Duplicate | Flag | PURGE
Josh Software Engineer / Developer Algorithm - 3of 3 votes
AnswersGiven a sorted array. Now following operations may be applied on even position elements:
- NIC October 03, 2014 in India
swap elements on even position. An element may be swap only once.
eg. 1 2 3 4 5 6 7 8 9 10
modified array:
1 2 3 8 5 10 7 4 9 6.
Find any given element in less than o(n) complexity.| Report Duplicate | Flag | PURGE
Josh Software Engineer / Developer Algorithm - 0of 0 votes
Answerswrite a program to find the minimum value in an unsorted array of integers. how many assignment operations happen within the loop?
- determinedgal89 October 01, 2014 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 2of 2 votes
Answerswhat does this code do?
- determinedgal89 October 01, 2014 in United Statesunsigned mystery(unsigned x) { unsigned i=0; while(x) { x=x&(x-1); i++; } return i; }
| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Bit Manipulation - 0of 0 votes
Answerswrite a program to return min value from an unsorted array of integers. How many assignment operations happen within the loop?
- determinedgal89 October 01, 2014 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Arrays - 0of 0 votes
AnswerYou are writing a simulation for a print server. This print
- determinedgal89 October 01, 2014 in United States
server can accept jobs from 3 places - network, USB, or operator. It can dispatch only one job at a time. Each input job should contain an integer t which is the time in seconds it will take to process the job. Write a multi-threaded program to simulate the server and provide some simulated load with jobs. Think, of some interesting statistics your program should emit and code them in.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Threads - 1of 1 vote
AnswersWe have 'n' patients and 'm' problems. The problems are of boolean type. Eg diabetes problem would be 'T' if a patient has it or 'F' otherwise. Suggest the data structure you would store this scenario on?
- Anon October 01, 2014 in United States
Q: We have a set of problems {diabetes, liver disease, kidney disease} find all the patients who have at least the 3 problems from the set.
The number of patients can be huge (n).
The number of problems not comparatively huge (m).
Which would be the best data structure to store these kind of records, so that we have a better search time.| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer / Developer Data Structures - 1of 1 vote
AnswersWrite a function to find the nth "ugly number". ugly numbers are numbers that can only be fully divided by 1, 2, 3, 5 and itself.
- ye.henry.tian October 01, 2014 in United States for logistics| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 2of 2 votes
AnswersWrite a function which gives the length of the largest palindrome found within a string.
- grekogecko October 01, 2014 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - -2of 2 votes
AnswersWrite a function that detects if a string is a palindrome.
- grekogecko October 01, 2014 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answers// You are given a rectangular grid of binary pixels that can be black or white.
- ATuring September 27, 2014 in United States
// Some of the pixels may be black, but you don't initially know how many or
// where.
//
// Given a starting point (x,y), fill (i.e. make black) the region the pixel is
// in.
. . . . . . . . . . . . . . . . . . . .
. X X X . . X X X . . X X X . . X X X .
. X * X X X X . X . . X X X X X X X X .
. X . . . . . . X . -- > . X X X X X X X X .
. X . . . . . . X . . X X X X X X X X .
. X X X X X X X X . . X X X X X X X X .
. . . . . . . . . . . . . . . . . . . .
* . . . . . . . . . X X X X X X X X X X
. X X X . . X X X . X X X X X X X X X X
. X . X X X X . X . X X . X X X X . X X
. X . . . . . . X . --> X X . . . . . . X X
. X . . . . . . X . X X . . . . . . X X
. X X X X X X X X . X X X X X X X X X X
. . . . . . . . . . X X X X X X X X X X
See the correct drawing here: https://stackoverflow.com/questions/26079328/given-a-starting-point-x-y-fill-the-region-in-a-grid-the-pixel-is-located| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 2of 2 votes
AnswersGiven a set of entries, each containing a time index and a int count value,
- FrickenHamster September 26, 2014 in United States
ie
class Entry
{
time:int
count:int
}
write a function that will give the time interval with the highest count together,
ie,
if we had entries
100, 2
100, 1
110, 10
200, 4
1000, 3
1200, 8
and we ran something like
int highestInterval(int interval_range)
highestInterval( 50 )
it would return 100, because in 100-150, you have counts 2, 1, and 10.
I managed to get a O(n^2) solution for it, but I think theres a better solution. I think it might have to do with some preprocessing of the interval buckets, but I can't figure out the solution.| Report Duplicate | Flag | PURGE
N/A Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite a program to calculate height of a binary tree non - recursively. USE ONLY STACK , not using BFS.
- !@# September 25, 2014 in United States
Then he asked to implement it for n-ary tree.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 2of 2 votes
AnswersHow would you implement virtual functions in C
- iwanna September 24, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer C# - 0of 0 votes
AnswersHow would you implement virtual functions in C?
- iwanna September 24, 2014 in United States| Report Duplicate | Flag | PURGE
Akamai Software Engineer / Developer C - 0of 0 votes
AnswersHow would you access private data member in a class? This class is defined in a library which you cannot modify. There are no friend functions.
- iwanna September 24, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer C++ - 0of 2 votes
AnswersHow to implement virtual functions in C?
- iwanna September 24, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer C