Amazon Interview Report
- 3of 3 votes
AnswersWrite a program to sort an array of strings so that all anagrams are next to each other
- Neo March 07, 2013 in United States for Web Service
ex
input {god, dog, abc, cab, man}
output {abc, cab, dog, god, man}| Report Duplicate | Flag | PURGE
Amazon Intern C++ Java - 0of 0 votes
AnswersWhat should be the output of the following code.
- Neo March 07, 2013 in United States for Web Service
class Test {
public int i=0;
@Override
public int hashCode() {
return i;
}
}
Class a{
psvm(){
HashMap <Test, String> hm = new HashMap();
Test t1 = new Test();
hm.put(t1,”success”);
sysout(hm.get(t1)); //print success
t1.i = 10;
sysout(hm.get(t1)); //NULL
}
}| Report Duplicate | Flag | PURGE
Amazon Intern Hash Table
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.