Developer Program Engineer Interview Questions
- 0of 0 votes
Answers2> write program to mirror the binary tree.
- shailendra.rajput January 17, 2015 in India| Report Duplicate | Flag | PURGE
Salesforce Developer Program Engineer Algorithm - 1of 1 vote
Answers1> write program to calculate power(x,n) in log(n) time
- shailendra.rajput January 17, 2015 in India| Report Duplicate | Flag | PURGE
Salesforce Developer Program Engineer Algorithm - 2of 2 votes
AnswersTo deploy a module inside kernel, what are the possible methods.? Mention actual difference among them.
- mayur_nandurkar January 12, 2015 in India| Report Duplicate | Flag | PURGE
Developer Program Engineer Linux Kernel - 0of 0 votes
AnswersYou to find the shortest palindrome string by adding 0 or more characters on the right side of the string.
- Vanquisher January 10, 2015 in India
for example:
string is java then answer would be avajava
string is enm then mnemn
string is aavaa then aavaa| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - 0of 0 votes
AnswerHow to implement your own Hashmap?
- Vanquisher January 10, 2015 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - -1of 1 vote
AnswersYou have infinite number of 3Rs coins and 5Rs coins. And your are provided one random number and u need to find out that whether you can make the amount with both denominations.
- Vanquisher January 10, 2015 in India
for example:
U r given a number: 23 then 5*4 +3 = 23 so true
U r given a number :16 then False.| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - 0of 0 votes
AnswersYou have a string and you need to find the shortest palindrome string from that string by adding 0 or more characters on right side of the string.
- Vanquisher January 10, 2015 in India
example:
String is java then answer would be avajava
String is emme then emme
String is hcasach| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - 0of 0 votes
AnswerHow to implement your own HashMap??
- Vanquisher January 10, 2015 in India
How to handle the collision using some chaining technique?| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - 0of 0 votes
AnswersWe have a Very big which our datatypes does not provide.
- Vanquisher January 10, 2015 in India
We need to multiply such numbers, how to do?
example :
Num1 = {1,2}, Num2 = {1,0} then ans would be {1,2,0}
Num1 ={5,3,6,2,8,2,0,2,8}, num2 ={3,5,2,3,2,1,}
then ans would be the multiplication value of 5362882028 X 352321| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer - 0of 0 votes
AnswersYou have infinite number of 3Rs coins and 5Rs coins. And your are provided one random number and u need to find out that whether you can make the amount with both denominations.
- Vanquisher January 10, 2015 in India
for example:
U r given a number: 23 then 5*4 +3 = 23 so true
U r given a number :16 then False.| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer Algorithm - 0of 0 votes
AnswersFind out the least recent occurred message.
- Vanquisher January 10, 2015 in India
Suppose your are getting message in streams, and you add it using add("M1").
You need to find out the least recent occurred message at any point of time.
for example,
Add("M1')->Add("M2') then LROM=M1
Add("M1')->Add("M2')->Add("M1') then LROM =M2
Add("M1')->Add("M2')->Add("M1')->Add("M3')-> then LROM =M2
Hope question is clear.| Report Duplicate | Flag | PURGE
Goldman Sachs Developer Program Engineer Algorithm - 0of 0 votes
AnswersThere is an integer INPUT array {1,2,3,4,5}. Create an OUTPUT array such that each element in output array consists Product of all elements in INPUT array divided by element at that point. But you have to do it without using divide operator (/).
- atul.pandav December 18, 2014 in India
e.g
intput={1,2,3,4,5}
output[0]=(1*2*3*4*5)/1
output[1]=(1*2*3*4*5)/2 and so on.
Don't use divide operator| Report Duplicate | Flag | PURGE
Accolite software Developer Program Engineer Algorithm - -1of 5 votes
Answers20
- yingsun1228 December 17, 2014 in India
/ \
8 22
/ \ / \
5 3 4 25
/ \
10 14
traverse this binary tree vertically and its output will be
5
8 10
20 3 4
22 14
25| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer - 0of 0 votes
AnswersChinese chess has 8*8=64 cells.And the point is (1,1),(1,2),..............(8,8).And the horse walks by diagonal line of two cells from where point it is.Calculate the shortest step(s) between two points for the horse to walk. Eg. (1,1) to (4,4). Horse go like this (1,1)>(2,3)>(4,4)
- MakeMe November 28, 2014 in United States| Report Duplicate | Flag | PURGE
Notfamous Developer Program Engineer Java - 0of 0 votes
AnswersChinese chess has 8*8=64 cells.And the point is (1,1),(1,2),..............(8,8).And the horse walks by diagonal line of two cells.Calculate the shortest step(s) between two points for the horse to walk. Eg. (1,1) to (4,4). Horse go like this (1,1)>(2,3)>(4,4)
- MakeMe November 28, 2014 in United States| Report Duplicate | Flag | PURGE
Notfamous Developer Program Engineer Java - 1of 1 vote
AnswersThere are different buildings standing close to each other. These are of same width but different height.
- Kiran Vadakath November 27, 2014 in India
Suppose if rainfall happens, what will be the volume of water that get trapped on top of all these buildings together. ?
INPUT (Example)
No: of buildings : 4
heights of the buildings(in any units): 3 4 3 4| Report Duplicate | Flag | PURGE
Directi Developer Program Engineer Algorithm - 0of 0 votes
Answers
- nebeew November 24, 2014 in IndiaYou are given an mxn grid, where (0,0) refers top most left position and (m-1,n-1) the bottom most right. The grid is filled with ones. All positions in the grid that are blocked are filled with zeros. You are given this grid and are assured that there exists atleast one path from (0,0) to (m-1, n-1). Find the minimum distance of the path from (0,0) to (m-1, n-1) given that you are allowed to move only vertically, horizontally and diagonally
| Report Duplicate | Flag | PURGE
Samsung Developer Program Engineer - 0of 0 votes
AnswersIf i have a graph which have n vertices and n-k edges than How many connected component it has ?
- Raj Hirani November 13, 2014 in India for code| Report Duplicate | Flag | PURGE
abc Developer Program Engineer Algorithm - 0of 0 votes
AnswersWrite an function to judge whether the input String is a number?
- fenghanlu November 11, 2014 in United States
For example: "-3.3425","80.0", both of them are number| Report Duplicate | Flag | PURGE
Linkedin Developer Program Engineer Algorithm - 0of 0 votes
Answerwhat is the heartbleed attack in Network security
- Eng.joumana October 22, 2014 in United States| Report Duplicate | Flag | PURGE
AppNexus Developer Program Engineer computer network - 0of 0 votes
Answersdesign a algo so that it receive an input
787668 787787 787948 787980 788094 788124
and produce the output the difference of two consecutive numbers
119,161,32,114,30
the input can varry to any length
- an25081981 October 15, 2014 in India| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Algorithm - 0of 0 votes
Answersdesing a algo so that it receive an input
787668 787787 787948 787980 788094 788124
and produce the output the difference of two consecutive numbers
119,161,32,114,30
the input can varry to any length
- an25081981 October 15, 2014 in India| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Algorithm - 0of 0 votes
AnswersIf a matrix of type float is casted to char *, how is it represented in memory, how to access the array elements.
- sravyachimata October 08, 2014 in Indiafloat mtrx[200][200] ={ {0}}; char *ptr = (char*)(& mtrx[i][j]);
| Report Duplicate | Flag | PURGE
Accenture Developer Program Engineer C# - 0of 0 votes
AnswersHow do a free() knows how much memory has to be free.Suppose
- tauqir0007 September 24, 2014 in India
int *p=(int*)malloc(sizeof(int)*100);
after some operation,
free(p);
Now how free() function knows from where to where memory has to be free?| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer C# - 0of 0 votes
AnswersWrite a c program to check number(0123456789) in array of string is valid or not
- rocky September 11, 2014 in United States
number is valid only if it is number or number padded with right space
for example char ex[10];
0123456789 valid
012345678a invalid
0123a56789 invalid
01234 invalid
012345678 valid
01234567 valid
12345 invalid
1234 678 invalid
123 4 5678 invalid| Report Duplicate | Flag | PURGE
Adobe Developer Program Engineer - 0of 6 votes
AnswersThere are a large number of leaves eaten by caterpillars. There are 'K"' caterpillars which jump onto the leaves in a pre-determined sequence. All caterpillars start at position 0 and jump onto the leaves at positions 1,2,3...,N. Note that there is no leaf at position 0.
Each caterpillar has an associated 'jump-number'. Let the jump-number of the i-th caterpillar be A [i]. A caterpillar with jump number 7 keeps eating leaves in the order 1,241,3*1,... till it reaches the end of the leaves - i.e, it eats the leaves at the positions which are multiples of /'.
Given a set 'A' of 'IC elements. 'e<=15.,. 'N'<=109, we need to determine the number of uneaten leaves.
Input Format:
N -number of leaves
A - Given array of integers
Output Format:
An integer denoting the number of uneaten leaves.
Sample Input:
N = 10
A = [2,4,5]
Sample Output:
4
Explanation
1,3,7,9 are the leaves which are never eaten. All leaves which are multiples of 2, 4, and 5 have been eaten.
Java Code:
- balakrishna.pininti September 09, 2014 in United Statespublic class Solution { //need to complete the function below static int countUneatenLeave(int N, int[] A { } public static void main(String[] args) throws IOException { Scanner in = new Scanner(System.in); final String fileName = System.getenv("OUTPUT_PATH"); BufferedWriter bw = new BufferedWriter(new FileWriter(fileName)); int res; int _N; _N = Integer.parseInt(in.nextLine()); int _A_size = Integer.parseInt(in.nextLine()); int[] _A = new int(_A_size]; int _A_item; for(int _A_i = 0; _A_i < _A_size; _A_i++) { _A_item = Integer.parseInt(in.nextLine()); _A[_A_i] = _A_item; } res = countUneatenLeaves(_N,_A); bw.write(String.valueOf(res)); bw.newLine(); bw.close(); } }
| Report Duplicate | Flag | PURGE
Google SDE1 Developer Program Engineer Algorithm - 1of 1 vote
AnswersDistributing Medals It's the medal distribution ceremony. 10^6 police officers, numbered from 1 to 10^6, are standing in a line. There are N (1<=N<=1000) iterations of medal distribution. In iteration i (0 < = i < N), count[i] ( 1 < = count[i] < = 100) medals are given to all officers from from[i] to to[i] ( 1 < = from[i] < = to[i] < = 10^6 )
- saurabh.find September 04, 2014 in India
If we sum up the number of medals received starting from the first officer, who would be the first officer for which the cumulative sum exceeds a given medal count THRESHOLD ( 1 < = THRESHOLD < = 10^9 )?
Input/Output Specifications Input format:
You are given 5 inputs:
input1 = N, the number of iterations
input2 = count, the array of medal counts in each iteration
input3 = from, the array of starting indices in each iteration
input4 = to, the array of ending indices in each iteration
input5 = THRESHOLD, the medal count threshold
Output format:
An integer, representing the number of the first officer such that the cumulative sum of medals starting from the first officer upto this officer exceeds THRESHOLD. The output should be -1 if such an officer does not exist.| Report Duplicate | Flag | PURGE
Developer Program Engineer Brain Teasers - -2of 2 votes
AnswersDistributing Medals It's the medal distribution ceremony. 10^6 police officers, numbered from 1 to 10^6, are standing in a line. There are N (1<=N<=1000) iterations of medal distribution. In iteration i (0 < = i < N), count[i] ( 1 < = count[i] < = 100) medals are given to all officers from from[i] to to[i] ( 1 < = from[i] < = to[i] < = 10^6 )
- saurabh.find September 04, 2014 in India
If we sum up the number of medals received starting from the first officer, who would be the first officer for which the cumulative sum exceeds a given medal count THRESHOLD ( 1 < = THRESHOLD < = 10^9 )?
Input/Output Specifications Input format:
You are given 5 inputs:
input1 = N, the number of iterations
input2 = count, the array of medal counts in each iteration
input3 = from, the array of starting indices in each iteration
input4 = to, the array of ending indices in each iteration
input5 = THRESHOLD, the medal count threshold
Output format:
An integer, representing the number of the first officer such that the cumulative sum of medals starting from the first officer upto this officer exceeds THRESHOLD. The output should be -1 if such an officer does not exist.| Report Duplicate | Flag | PURGE
Developer Program Engineer Brain Teasers - 1of 1 vote
AnswersWe need to make a string of size n. Each character of the string is either ‘R’, ‘B’ or ‘G’. In the final string there needs to be at least r number of ‘R’, at least b number of ‘B’ and at least g number of ‘G’ (such that r + g + b <= n). We need to find number of such strings possible.
- himanshu.tomar05 September 03, 2014 in India
For example,
n = 4, r = 1, b = 1, g = 1.
Output:
36| Report Duplicate | Flag | PURGE
Directi Developer Program Engineer Algorithm