Amazon Interview Report
- 0of 0 votes
AnswersThe normal shell script question, give a unix command that takes an input as a pattern and searches all unique numbers in the file
- An April 04, 2012 in United States
I came up with egrep [ pattern ] im not sure if it was correct syntactically but i explained the logic to him and he said ok, lets move on to the next question -.-| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Unix - 0of 0 votes
AnswersAll the Insert,delete and search complexities for Arrays,HashMaps,Binary trees.
- An April 04, 2012 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 2of 2 votes
AnswersGiven a function, take a number and the bit position and return true if that bit is set to 1 and false otherwise.
- An April 04, 2012 in United States
It took me a few minutes to think something like this, pasted code is after he corrected me on 2 silly mistakes.
bool ret_result(int number, int pos) {
int k=1;
for(int i=0;i<pos;i++) {
k=k<<1;
}
if(number&k==1) {
return true;
}
else {
return false;
}
}| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Bit Manipulation