Developer Program Engineer Interview Questions
- 0of 0 votes
AnswersSuppose an array contains below values
- pippirisaikumar.9 January 06, 2014 in India
A = {A,B,C,B,A,C,A,B,C,A} then the output should display in the below format
A=4;B=3;C=3
Could you please send the logic for the above question in C ?| Report Duplicate | Flag | PURGE
Infosys Developer Program Engineer - -1of 3 votes
AnswersProblem Statement: A child is arranging rocks in layers. He can arrange the rocks, in such way that, any layer has lesser rocks than its base layer. Given n rocks, In how many ways can the child arrange the rocks.
- ayushsethi22031992 January 02, 2014 in India| Report Duplicate | Flag | PURGE
Developer Program Engineer Algorithm - 3of 3 votes
AnswersGiven two unsorted integer arrays A & B of unequal length.
- vikas.singh.nitj December 05, 2013 in India
Find an element from A(say 'X') and another element from B(say 'Y') such that |X-Y| is minimum.
Note: A & B can contain positive/negative numbers.
How can you find this without sorting both arrays?
How can you find this by sorting both arrays?| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Algorithm - 0of 0 votes
AnswersHow to partition an array of integers into subarrays so that the average of the two subarrays becomes equal, in efficient way?....
- ajayjohnian1 December 04, 2013 in United States| Report Duplicate | Flag | PURGE
Amdocs Developer Program Engineer - 0of 0 votes
Answerhow to convert array into sub arrays
- ajayjohnian1 December 04, 2013 in United States| Report Duplicate | Flag | PURGE
Amdocs Developer Program Engineer - 0of 0 votes
Answershow to convert array into sub array so that we can access element from array into sub arrays in serial manner
- ajayjohnian1 December 04, 2013 in India| Report Duplicate | Flag | PURGE
Alcatel Lucent Developer Program Engineer - 0of 0 votes
Answersexplain with example when to use mutex and when to use semaphore
- skbb18 December 02, 2013 in India| Report Duplicate | Flag | PURGE
StartUp Developer Program Engineer Unix - -1of 3 votes
AnswersGiven N,O where N=No. of digits that can be displayed on calculator and O=No. of multiplication to be performed.
- lorinahmed November 27, 2013 in India
The numbers used for the multiplication can be from {2,3,...8,9}
2<=N<=8
2<=O<=30
write function that will return the largest num that can be obtained after O multiplication.
Eg: N=2, O=3
the function should return 98, since the maximum no. generated after 3 multiplications 2*7*7.
function should return -1 for error or invalid.| Report Duplicate | Flag | PURGE
Directi Developer Program Engineer - -1of 1 vote
Answersc program to print input 11000011 and output will be 0000
- anusha03dec November 19, 2013 in India for 8
Ex: 00011000
output =11| Report Duplicate | Flag | PURGE
HCL Developer Program Engineer - 0of 0 votes
AnswersC program to print from 1 paragraph it should print from 1st word 1st letter,2nd word 2nd letter, 3rd word 3rd letter if the word is less than 3 letter it should print new line, and again 4th word 4th letter.....
- anusha03dec November 19, 2013 in India for 8
example:
Once when a Lion was asleep, a little Mouse began running up and down upon him.
output will be:
O h
o
e
l e| Report Duplicate | Flag | PURGE
HCL Developer Program Engineer - -6of 6 votes
Answersplease tell me about a good website data structure in c++???
- 12024156-061@uog.edu.pk November 13, 2013 in India| Report Duplicate | Flag | PURGE
CareerCup Developer Program Engineer Data Structures - 0of 0 votes
AnswersSort two string arrays and merge into one in alphabet order? which sorting algorithm would be good here?
- Ravi October 31, 2013 in India
suppose str[]="ab" and str2[]="badg" and str3 should be aabbdg, should work for all combinations.| Report Duplicate | Flag | PURGE
Citrix System Inc Developer Program Engineer C# - 0of 2 votes
Answers00011111100011
- sunshihaosd October 22, 2013 in United States
11100010111110
11000111111100
00111100001111
00110000110000
11000100000110
find the maximum areas(m*n) covered by 0.| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Algorithm - -2of 2 votes
AnswersLong Subtraction -- Given two arrays A, B, each contains elements of digits, return an array of A - B. Your machine can only do calculation of less than 20.
- therethere October 11, 2013 in United States
eg. A = [1,2,5,7,5];
B = [3,4,8,9];
A - B = [9,0,8,6];| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Algorithm - 1of 1 vote
AnswersGiven a keyboard with every letter maps a digit from 0 to 9, return all possible permutation of given a n digit number.
- therethere October 11, 2013 in United States
eg. 0 <- z,a,q,x,s,w
1 <- c,d,e
2 <- v,f,r
3 <- b,g,t
...
Then permutation of num 1230 will be:
cvbz
cvba
cvbq
...| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Algorithm - -2of 2 votes
AnswersString temp = "A" + "B" + "C" ;
- tare.rohan October 11, 2013 in India
how many objects are created| Report Duplicate | Flag | PURGE
Developer Program Engineer Java - 0of 0 votes
AnswersFind the word in the given sentence.
- Anonymous October 05, 2013 in United States
i)Check whether it exists
ii)If exist means return count and index.
Ex:
string="CSK lost to RR"
substr="CSK"
CSK exist in above string.The substr CSK is presented at the index of 0-2 in string.
The count is 1.| Report Duplicate | Flag | PURGE
Developer Program Engineer - 9of 9 votes
AnswersArrayList list = new ArrayList();
- glebstepanov1992 October 03, 2013 in Russia for Yandex
what would you improve in this code?| Report Duplicate | Flag | PURGE
Developer Program Engineer - 0of 0 votes
Answerswrite a program to print a matrix
- ciitaram September 27, 2013 in India
1 2 3
4 5 6
7 8 9
I need to print like following
1 2 3 6 9 8 7 4 5| Report Duplicate | Flag | PURGE
Developer Program Engineer C# C++ - 0of 0 votes
AnswersYou have 13 sorted cards, every cards from "2 ,3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A".
- Roc September 26, 2013 in United States
you can discard all cards, according to some rules:
a pair of cards, like: 2,2
three cards, like: 8,8,8 or 8,9,10; J,Q,K
card A can convert to any cards as you wish, like: A -> 3
For example: Input: 2 2 3 4 5 5 6 7 8 8 9 9 9
you can discard: 2 2
3 4 5
5 6 7
8 8
9 9 9
output:
TURE
Input:
2 2 3 4 5 5 6 7 8 9 10 J A
āAā can be converted to āJā, so
you can discard
2 2
3 4 5
5 6 7
8 9 10
J J
output
TRUE| Report Duplicate | Flag | PURGE
Accenture Developer Program Engineer - 3of 13 votes
AnswersPrint the numbers between 30 to 3000.
- Anonymous September 25, 2013 in United States
CONSTRAINT:
The numbers shouldnt contain digits either in incresing order or decreasing order.
FOLLOWING NOT ALLOWED
##123,234,345,1234,2345##increasing order,
##32,21,321,432,3210 etc##decresing order.
FOLLOWING ALLOWED:
243,27,578,2344 etc.,
Now see who ll code ths....| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer - -1of 1 vote
AnswersFind largest palindrome in a file without altering the file (like deleting white spaces).
- Seeker September 25, 2013 in United States
The palindrome def is relaxed - it allows for spaces in between words- do not bother about spaces.| Report Duplicate | Flag | PURGE
Google Developer Program Engineer - 0of 2 votes
AnswersInput : A Perl program file
- Seeker September 25, 2013 in United States
We need to modify the file to have a max of 80 characters per line and create a new perl file.
Problem is we need to use "/" wherever we split the line and also, the split MUST happen at a place with white space. (ASSUMPTION - No is >75 characters)| Report Duplicate | Flag | PURGE
Google Developer Program Engineer Algorithm Perl Python - 0of 2 votes
AnswersUse SIMPLE LOGIC for Converting this string str="aaabbccc" into str="3a2b3c".
- Anonymous September 23, 2013 in United States
###Note:###
I gave 3 diff solutions to interviewer with loops,conditions etc.,But he wanted a real OPTIMAL SOLUTION..lets see who ll write!!!!!| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer - 0of 2 votes
AnswersStr="4142434546" Findout missing no 44.Add it to str;
- Anonymous September 20, 2013 in United States
Output:"414243444546".
once again i got stucked in this..Help me..| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer - -1of 1 vote
AnswersPgm to compare two strings..Their we have to compare
- Anonymous September 13, 2013 in United States
i) first char at first time.
ii) second char at second time
iii)third char at third time..so on..
My code is : for(i=0;i<str[i].length();i++)//str1
{
for(j=0;j<str[j].length();j++)//str2
if(str[i].charAt(i)==str.charAt(j))
{
printf("yes");
}
else{
printf("false");
}}}
Any more suggestions?| Report Duplicate | Flag | PURGE
Adap.tv Developer Program Engineer - -2of 2 votes
AnswersPrint our name in pascal triangle..
- Anonymous September 13, 2013 in India
ex:anony| Report Duplicate | Flag | PURGE
Adap.tv Developer Program Engineer