Coding Interview Questions
- 0of 0 votes
AnswersFind no. of days between Jan1st and entered date (See question posted by Troy on Oct 7 2010)
- Guest December 06, 2010| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer / Developer Algorithm Coding - 0of 0 votes
AnswersBangalore written test
- Anonymous December 04, 2010
fucntion prints given 2d array in spiral fashion. give all test cases to test it| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersBangalore written test
- Anonymous December 04, 2010
C function was given to find out the occurance of character "A" from an array. Need to find out the bugs in program.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersWrite a function to find out longest palindrome in a string.
- andy November 24, 2010
I was also asked about one interesting system design (not Object Oriented) but I don't remember it properly (I was interviewed almost one month back)| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
Answers5) Programming question:
- Nona Namgiv November 09, 2010
a. Given two integer arrays and the size of each array.
b. Determine if arrays match.
c. Order of elements does not matter.
d. Number of occurrences does matter.
e. Return true for match, false for no match
f. Computational complexity is important.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
Answersfunction to divide two number without using the divide operator
- Anonymous November 08, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersGiven an array of size n wherein elements keep on increasing monotically upto a certain location
- Anonymous November 05, 2010
after which they keep on decreasing monotically, then again keep on increasing, then decreasing
again and so on. Sort the array in place (ie. using only O(1) extra memory).| Report Duplicate | Flag | PURGE
Adobe Coding - 0of 0 votes
AnswersYou are given a lot of cuboid boxes with different length, breadth and height. You need to find the maximum subset which can fit into each other.
- Anonymous November 03, 2010
For example:
If Box A has LBH as 7 8 9
If Box B has LBH as 5 6 8
If Box C has LBH as 5 8 7
If Box D has LBH as 4 4 4
then answer is A,B,D
A box can fit into another only and only if all dimensions of that is less than the bigger box. Also Rotation of boxes is not possible.| Report Duplicate | Flag | PURGE
Adobe Software Engineer / Developer Coding - 0of 0 votes
AnswersImagine a goat placed at upper-left corner of a matrix A[i,j ]and the goat has to go to the lower-right corner of matrix . Now the goat can move only right or down such that when it moves to a different point it eats the grass at that point . If A[i,j] = Acres of grass at the point then write a code in C++ such that the goat eats maximum grass and also moves closer to its destination .
- Ankur November 03, 2010| Report Duplicate | Flag | PURGE
Directi Software Engineer / Developer Coding - 0of 0 votes
AnswersGiven two sorted singly linked lists L1 and L2. Make L1 like L2 i.e say,
- omkar November 02, 2010
L1 = 10->30->45->80->null
L2 = 2->22->35->56->100->null
Then after writing the program, L1 should look same as L2| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersGiven an integer array of which both first half and second half are sorted. Write a function to merge the two parts to create one single sorted array in place [do not use any extra space].
- coder November 01, 2010
e.g. If input array is [1,3,6,8,-5,-2,3,8] It should be converted to: [-5,-2,1,3,3,6,8,8]| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Coding - 0of 0 votes
Answerswhat is the output of
- narendra.gov October 31, 2010
for(;0;)
printf("\n guess");
and why?| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Brain Teasers C Coding Debugging Algorithm - 0of 0 votes
AnswersWrite a "C" function,
- dev October 30, 2010
int AddOvf(int* result, int a, int b)
If there is no overflow, the function places the reusltant
sum a+b in "result" and returns 0. Otherwise it returns -1.
The solution of casting to long and adding to find detecting the
overflow is not allowed :-)| Report Duplicate | Flag | PURGE
Adobe Developer Program Engineer Coding - 0of 0 votes
AnswersGiven an input sequence of characters like abcd... . Write a function which tells if the input received so far is palindrome. is it possible to tell without storing all the input sequence?
- Anonymous October 29, 2010
something like an infinite stream of characters.| Report Duplicate | Flag | PURGE
Software Engineer / Developer Coding - 0of 0 votes
Answersan array contain +ve and -ve element, find subarray whose sum =0;
- manni October 29, 2010| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Coding - 0of 0 votes
Answerswrite a function to evaluate following expression
- bond October 23, 2010
5+4-3*2| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersGiven a denomination and an integer find out in how many ways can the number integer be written via denominations
- bond October 23, 2010
int function (int [] ,int N){
}
int denomination[] = [1,2,5,10]
N=6
1+1+1+1+1+1
1+1+1+1+2
1+1+2+2
1+5
2+2+2
answer 6| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersTelephone Dir lookup:
- Cartman October 19, 2010
Given mapping: number to letters (just like on the telephone buttons)
i/p: digit string e.g. "1234"
1. o/p: all possible letter strings based on the mapping.
2. o/p only those strings that are in a given dictionary. (and length of the dictionary is small.)| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Coding - 1of 1 vote
Answers"Count and Say problem" Write a code to do following:
- Cartman October 19, 2010
n String to print
0 1
1 1 1
2 2 1
3 1 2 1 1
...
Base case: n = 0 print "1"
for n = 1, look at previous string and write number of times a digit is seen and the digit itself. In this case, digit 1 is seen 1 time in a row... so print "1 1"
for n = 2, digit 1 is seen two times in a row, so print "2 1"
for n = 3, digit 2 is seen 1 time and then digit 1 is seen 1 so print "1 2 1 1"
for n = 4 you will print "1 1 1 2 2 1"
Consider the numbers as integers for simplicity. e.g. if previous string is "10 1" then the next will be "1 10 1 1" and the next one will be "1 1 1 10 2 1"| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Coding - 0of 0 votes
Answersfind one missing card from deck of 51 card
- movence October 18, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersWrite a function that takes in two rectangles and returns true if the overlap and false if they do not.
- M October 17, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersWrite code for finding square root of a given no.
- Billa October 13, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersReverse words in a string
- Anonymous October 08, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersI was asked to implement the something like 4*5+9
- Anonymous October 08, 2010
there can only be integers and only + - * and / operand| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswerThe same security keypad question which has already been posted here twice or thrice.
- Troy October 07, 2010| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite code to print all the possible combinations of the words in a string?
- codeNombre September 21, 2010
Example:
Input: This is String
Result:
This is String
String is This
This String is
String This is
is This String
is String This| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswerImplement atoi in C.
- dimarzio August 30, 2010| Report Duplicate | Flag | PURGE
Real Networks Software Engineer / Developer Coding