Minnu
BAN USER- 0of 0 votes
Answersdifferences between integer and int
- Minnu in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
Answersgiven stream of integers? find first 100 large numbers
- Minnu in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
Answershow garbage collector works in java
- Minnu in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
Answerswhat is virtual binding?
- Minnu in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
AnswersWhat is deadlock? example
- Minnu in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
AnswersGiven file tokens find common token?
- Minnu in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
Answersgiven arr1 = {5,6,4,2,2} arr2={4,2,2,1}
- Minnu in United States
return common elements {4,2,2}| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
AnswersGiven two arrays, write a program to merge them to a new sorted array ? and give test cases..
- Minnu in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
AnswersWrite a program that finds whether the two binary trees are mirror image of each other?
- Minnu in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm
"What will happen if two different objects have same hashcode?”
call keys.equals() method to identify correct node in LinkedList and return associated value object for that key in Java HashMap
"Since hashcode is same, bucket location would be same and collision will occur in HashMap, Since HashMap use LinkedList to store object, this entry (object of Map.Entry comprise key and value ) will be stored in LinkedList.
IsValidBST(root,Integer.MIN_VALUE,Integer.MAX_VALUE);
bool IsValidBST(BinaryNode node, int MIN, int MAX)
{
if(node == null)
return true;
if(node.element > MIN
&& node.element < MAX
&& IsValidBST(node.left,MIN,node.element)
&& IsValidBST(node.right,node.element,MAX))
return true;
else
return false;
}
yes two sorted arrays merge to get sorted array
int[] merge(int[] a, int[] b){
int[] answer = new int[a.length + b.length];
int i = 0, j = 0, k = 0;
while (i < a.length && j < b.length)
{
if (a[i] < b[j])
{
answer[k] = a[i];
i++;
}
else
{
answer[k] = b[j];
j++;
}
k++;
}
while (i < a.length)
{
answer[k] = a[i];
i++;
k++;
}
while (j < b.length)
{
answer[k] = b[j];
j++;
k++;
}
return answer;
}
and runtime complexity is o(m+n) m, n are array sizes
This is my third technical telephonic interview first two were purely coding, for software developer/Engineer position and interviewer was Software Development Engineer - AWS Marketplace, my first telephonic was from same department and second was by AMAZON silk
- Minnu January 08, 2013