NVIDIA Interview Question
Software Engineer / DevelopersUse a look up table. Store reversed bytes(obtained from a similar function as yours) in an array. Then reverse of number n would be array[n]
Use a look up table. Store reversed bytes(obtained from a similar function as yours) in an array. Then reverse of number n would be array[n]
is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
{
- SigPro July 13, 2007char a;//the input variable
char b;// the output variable
int X=sizeof(a)*tot_siz;
b=a;
a>>=1;
while(a){
b|=a&1;
b<<=1;
a>>=1;
X--
}
b<<=X;
}
i think this should work..but then he asked me optimize the code further..i said you could use bit masking techniques in a look up format like 0x5555 and 0x3333 types...he then said there's a better way to get this done... am i missing something?