Applications Developer Interview Questions
- 0of 0 votes
AnswersWrite a function to find an first non-duplicate Character from the given String. For example : String "efficiency" has 'n' first non-duplicate character.
- priti2.jain August 16, 2013 in United States| Report Duplicate | Flag | PURGE
McAfee Applications Developer Algorithm - 3of 7 votes
Answersgiven an input array of integers where each integer represent the maximum amount of jump a frog can take.Frog has to reach the end of the array in minimum number of jumps.
- aka[1] August 05, 2013 in United States
Example:[1 5 4 6 9 3 0 0 1 3] answer is 3 for this.
[2 8 3 6 9 3 0 0 1 3] answer is 2 for this.
Any DP solution for this?| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
Answerswrite the jquery for simultaneous dropdown and pagination i.e. we have 500 rows in a table and we want to display those rows. pagination will be used and also dropdown means if no of rows to be displayed is 10 per page then 10 rows per page should be displayed and dropdown changes should go with pagination.
- manisha khan July 30, 2013 in India| Report Duplicate | Flag | PURGE
Amdocs Applications Developer JavaScript - 0of 0 votes
AnswersGiven:You have given Amazon's stock prices for next 10 days
- PKT July 23, 2013 in United States
Find out: max benefit in best time complexity to buy and sell 1 share
Condition: Share must be sold any day after buying date.
For ex:
Share in thousands
5 1 4 6 7 8 4 3 7 9
Max benefit 9 - 1 = 8 thousand| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
AnswersWhat is the best(time and space complexity) data structure to remove duplicates from given N elements.
- pirate July 18, 2013 in India
And how?| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
AnswersWrite a program to get shortest path between two given nodes in a binary tree.
- pirate July 18, 2013 in India| Report Duplicate | Flag | PURGE
Amazon Applications Developer C - -2of 2 votes
Answershow to send message using php script ?
- Surender July 12, 2013 in India| Report Duplicate | Flag | PURGE
JP Morgan Applications Developer PHP - 6of 12 votes
AnswersGiven a list of integers, find out the biggest interval that has all its members in the given list. e.g. given list 1, 7, 4, 6, 3, 10, 2 then answer would be [1, 4]. Develop algorithm and write code for this
- prongs July 08, 2013 in India| Report Duplicate | Flag | PURGE
Google Applications Developer Algorithm Arrays C++ Coding - 0of 0 votes
AnswersWrite code to clone a graph recursively
- prongs July 08, 2013 in Indiastruct Node { int data; vector<struct Node*> neighbors; }
| Report Duplicate | Flag | PURGE
Google Applications Developer Algorithm C++ Coding - 1of 1 vote
AnswersHow can I store objects of differing types in a C++ container?
- crat July 04, 2013 in India| Report Duplicate | Flag | PURGE
Akamai Applications Developer - 1of 1 vote
AnswersGiven N integer array, I want to fill the array with product of all numbers except the number in that cell.
- X July 04, 2013 in United States
What is the complexity ? Do not worry about 0's or negative numbers in the array.
[Interviewer was more interested in how the multiplication/division gets effected as number of bits required to represent the intermediate products increases.]| Report Duplicate | Flag | PURGE
Google Applications Developer Algorithm - 2of 4 votes
AnswersGiven a screen with all pixels having one of two colors. Now I will click on a random pixel.
- X July 04, 2013 in United States
Then that pixel & all the adjacent pixels with same color should change the color to the second color.
adjacent = vertically or horizontally above or blow.
Edit: Question seem to be not clear to some ppl. Giving an ex:
Given below & clicked on 2nd row, 2nd col
W B W W B W
B B W W B W
W B B B W B
W B W W B B
Covert to
W W W W B W
W W W W B W
W W W W W B
W W W W B B| Report Duplicate | Flag | PURGE
Google Applications Developer Algorithm - 0of 0 votes
AnswersWrite a program to check if one tree is a subtree of other or not.
- getprith June 24, 2013 in India| Report Duplicate | Flag | PURGE
Applications Developer Trees and Graphs - 0of 0 votes
AnswersEmployees in my company are complaining about elevator, saying its too slow... Lift operates for 50 floors
- anonymous June 14, 2013 in United States
I hire you and you have to tell me what is the problem and solutions to it.
Input:
Motor can't be changed
You can't get a new elevator as its too costly.
Get 5 matrices you would collect and how would you use them.| Report Duplicate | Flag | PURGE
Google Applications Developer - 0of 0 votes
AnswersHow would you design a movie search engine.
- anonymous June 14, 2013 in India
Think about both abstract and specific questions. How would you answer each of them.
ex: get me romantic movies, latest movies, movies with fight of no more than 10 mins.| Report Duplicate | Flag | PURGE
Google Applications Developer - 5of 5 votes
AnswersGiven a set of numbers, find the longest subset with consecutive numbers be it any order.
- anonymous June 14, 2013 in India
Input:
S = { 5, 1, 9, 3, 8, 20, 4, 10, 2, 11, 3}
we have 2 consecutive sets
s1 = {1, 2, 3, 4, 5}
s2 = { 8, 9, 10, 11}
Ans.
s1 = {1, 2, 3, 4, 5}| Report Duplicate | Flag | PURGE
Google Applications Developer Algorithm - 0of 0 votes
AnswersBy default, Hashtable is unordered. Then, how can you retrieve Hashtable elements in the same order as they are put inside???
- amit.grynch May 30, 2013 in United States| Report Duplicate | Flag | PURGE
Adobe Applications Developer Java - 0of 0 votes
Answershow can we measure size of a object in java?
- amit.grynch May 30, 2013 in India| Report Duplicate | Flag | PURGE
Adobe Applications Developer Java - 0of 0 votes
AnswersA log file is of below format
log.txt
=====================================
TIMESTAMP:MM-DD-YYYY
REQUEST:______________________________
RESPONSE:____________________________
SUCCESS:200:________________________
=====================================
TIMESTAMP:MM-DD-YYYY
REQUEST:______________________________
RESPONSE:____________________________
ERROR:400:________________________
=====================================
TIMESTAMP:MM-DD-YYYY
REQUEST:______________________________
RESPONSE:____________________________
ERROR:=500:________________________
=====================================
TIMESTAMP:MM-DD-YYYY
REQUEST:______________________________
RESPONSE:____________________________
ERROR:400:________________________
=====================================
TIMESTAMP:MM-DD-YYYY
REQUEST:______________________________
RESPONSE:____________________________
ERROR:401:________________________
I want the count of error between two given dates.
- anushvenki May 12, 2013 in Indiagrep '0[6789]:\| 1[01234567]' | ""grep -c "ERROR" log.txt timestamp = grep "TIMESTAMP" awk '$timestamawk>=from&&$timestamp<=to' from="2007/03/20 15:13" to="2007/08/19 14:31" log.txt | grep "ERROR" | wc -l timestamp = grep "TIMESTAMP" echo timestamp | awk -F'[- ]' '$2 >= 25 && $3 <= 04 { print }' | grep -c "ERROR"
| Report Duplicate | Flag | PURGE
Amazon Applications Developer Unix - 0of 0 votes
Answersgiven an array of charactes have to replace space with %20. where %20 is considered as 3 characters.write complete code to implement this.
ps: assume that array has enough space at the end that can fit one space character to 3 chacters(%20).
- anushvenki May 12, 2013 in Indiaimport java.io.* char fn(char [] word) { for(int i =1;i<=word.length();i++) { if(char[i]==" " && isArrayRightShiftable(word)){ shiftArrayToRight(word,i); char[i]='%'; char[i+1]='2'; char[i+2]='0'; } } return word; } private boolean isArrayRightShiftable(char[] word) { if(word.length()+2 < 50){ return true; } return false; } private void shiftArrayToRight(char[] word, int i) { for(int j = word.length();j>=i;j--) word[j+2]=word[j]; }
| Report Duplicate | Flag | PURGE
Amazon Applications Developer Problem Solving - 0of 0 votes
AnswersFind the maxProduct of three numbers from a given integer array.
1. Handle all the cases
2. Interviewer was looking for a complete code
- anushvenki May 12, 2013 in Indiapublic int maxPro() { // -5, -4, -3, -2 , 0 Int array[] = new Int[]{4,5,6,0,-5,-7,-2,-10}; Arrays.sort(array); // -10,-7,-5,-2,0,4,5,6 int count =0; for(int i =0; i<array.length();i++){ if(array[i]<0) count = count+1; } int maxProduct =1; if ( array.length()<3){ return -1; } else if( array.length()>=3 ){ int a=1; b=2; if(count>=2){ a = array[0]*array[1]*array[array.length-1]; b = array[array.length-1]*array[array.length-2]*array[array.length-3]; maxProduct = Math.max(a,b); } else if (count == 0 || count == 1 || count == array.length()){ maxProduct = array[array.length-1]*array[array.length-2]*array[array.length-3]; } } return maxProduct; }
| Report Duplicate | Flag | PURGE
Amazon Applications Developer Coding - 1of 1 vote
Answersfollowing coins: half dollar, quarters,dime, nickel and penny. Print all the possible combinations of coins that will equal to one dollar.(Ex : (2) half-dollar , (4) quarter dollar etc )..
- Algorithms_99 April 29, 2013 in United States| Report Duplicate | Flag | PURGE
Yahoo Applications Developer Coding - 0of 0 votes
Answerswhich of the following is true for static member of the class?
- sohit April 09, 2013 in India
a) internal linkage
b) external linkage| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer C++ - 1of 1 vote
Answers#include<iostream>
- sohit April 09, 2013 in India
#include<exception>
int main()
{
try
{
cout << "sum";
throw 3;
}
catch(...)
{
cout<< "dot";
}
catch(int a)
{
cout << a;
}
catch(exception e)
{
cout << "exception";
}
return 0;
}
what will be the output of the above program?| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer C++ - 0of 2 votes
AnswerFor the written test please prepare the following topics throughly :
- sohit April 09, 2013 in India
a) virtual function
b) operator overloading
c) namespace
d) template
For interview, please prepare the container throughly with the implementation of list,map etc.| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer C++ - 0of 2 votes
Answersclass a{
- sohit April 09, 2013 in United States
public:
int var1;
a(int var)
{
var1 = var;
}
};
class b: public a
{
public:
int var2;
b(int d) : var2( d++) , a(var2++)
{
}
};
int main
{
b obj1(5);
}
What will be the value of the variable 'var1' in class A?
a) 6
b)7
c) 5
d) undefined| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer C++ - 0of 0 votes
Answersclass a{ public: int a; virtual void sum() { printf("sum"); } }; class b : public a { public: int b; virtual void sum() { printf("sum of class b"); } }; void main() { b aptr; a *bptr; bptr = &aptr; bptr->sum(); }
Output of the above program?
- sohit April 09, 2013 in United States| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer C++ - 0of 0 votes
AnswersWhy the size of the empty class is one?
- sohit April 09, 2013 in India
What are the default functions in an empty class.
does the size of empty class depend upon the compiler or hardware(32 bit or 64 bit)?| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer C++ - 0of 0 votes
AnswersIs any specific use of empty class??
- techieDeep January 29, 2013 in India| Report Duplicate | Flag | PURGE
Adobe Applications Developer