Microsoft Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

dint understand your question. Can you elaborate a little more if u can ?

- Rasmus April 07, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

We have set of data in the buffer. Each chracters might Single byte or double byte. That mean mixed of ASCII and double byte chracters. We need to implement backspace algorithm. Each character first bit will give us the information about double or ASCII. That means if the first bit is 0 - chracter is AsCII and 1 means double byte

- N.M April 07, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

can you give one example..your algorithm output is still not clear

- rishi April 07, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

can you give one example..your algorithm output is still not clear

- rishi April 07, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I think this is very simple.

Parse 1 byte (char) from the buffer. Now AND this char with 1000000 and see if this value is non zero. If non zero then it means that the 1st bit of our char is 1, this means that that char is double byte so increment 2 spaces in your buffer or if the AND value is 0 then it means that the 1st bit in our char is 0, so increment 1 space in our buffer.

Do I make sense ???

Assumption: our machine on which we are operating is a Big endian style. if it is a little endian machine then we need to AND the above algorithm with 00000001.

Let me know if I missed any point.

- Rasmus April 07, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

@Rasmus... endian problem is not bit wise it is byte wise ....IMHO you dont need to worry about it while manipulating a single byte.

- anand April 13, 2011 | Flag


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

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.

Learn More

Resume Review

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.

Learn More

Mock Interviews

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.

Learn More