An
BAN USER- 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 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 - 0of 0 votes
AnswersAll the Insert,delete and search complexities for Arrays,HashMaps,Binary trees.
- An in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 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 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
AnswersWhat is a queue, advantages, disadvantages
- An in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersWhat is a Stack, what are its advantages, disadvantages.
- An in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures - 0of 0 votes
AnswersWhat is finally in java, and why is it used.
- An in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Java - 0of 0 votes
AnswersExceptions in Java, checked/unchecked and how are they handled
- An in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Java
@unome, yes that was what the question was.
were a few cases like if the intersection element in the second list was repeated..in that case if an element was repeated then add the string back to the map with a NULL so repeated intersection elements in the second list are not added more than once to the third list.
RepLoriKetron, Accountant at Aspire Systems
I am a content marketing professional at HubatSpot, an inbound marketing and sales platform that helps companies attract visitors, convert ...
Repjennifertkramer, AT&T Customer service email at ADP
I had a dream to open my own Restaurant in FL. and i came true all dream with my hard ...
RepJenniferSRoe, Android test engineer at Accolite software
I am Jennifer from Dublin. I am Photographer, I have experienced in all different kinds of photography -Strong aesthetic sense ...
Rephollymclark8, Apple Phone Number available 24/7 for our Customers at Accenture
I am clinical laboratory technologist in Stratapro company. I have Excellent clinical laboratory skills, with commended performance conducting/analyzing laboratory ...
Repmarierlewis2, AT&T Customer service email at ASAPInfosystemsPvtLtd
I am Marie and I live in Los Angeles USA, I have a strong base in marketing and I believe ...
I dont know...did not ask him that, what should happen, throw an error? In that case its just an if check....
- An April 08, 2012