Microsoft Interview Question for Software Engineer / Developers






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

What the .... ?

- dontUnderstandQuestion June 26, 2005 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I added some formatting. Look at it again.

- Gayle L McDowell June 27, 2005 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I still don't understand the question. Say you need to encode the following, what would the encoded result be?

<product sku="9820Y" size="small" type="tshirt">
<itinerary>
<sold>283</sold>
<onhold>232</onhold>
<returned>23</returned>
</itinerary>
</product>

- DontUnderstandQuestion December 04, 2005 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Oops, the xml didn't show up in the last post...here it is again (hopefully)
&lt;product sku="9820Y" size="small" type="tshirt"&gt;
&lt;itinerary&gt;
&lt;sold&gt;283&lt;/sold&gt;
&lt;onhold&gt;232&lt;/onhold&gt;
&lt;returned&gt;23&lt;/returned&gt;
&lt;/itinerary&gt;
&lt;product&gt;

- DontUnderstandQuestion December 04, 2005 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Ok, so this is a grammar, so here are the first two steps:
Encode[product]
-> Hash["product"] Encode[sku] Encode[size] Encode[type] END Encode[itinerary] END
-> Hash["product"] Hash["sku"] 9820Y Hash["size"] small Hash["type"] tshirt END Hash["itinerary"] END Encode[sold] Encode[onhold] Encode[returned] END END
-> Hash["product"] Hash["sku"] 9820Y Hash["size"] small Hash["type"] tshirt END Hash["itinerary"] END Hash["sold"] END 283 END Hash["onhold"] END 232 END Hash["returned"] END 23 END END END

I think that's right... all the ENDs would be changed to 01 and the hashed values would be looked up in a dictionary.

- Gayle L McDowell December 05, 2005 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Ok...thanks!

- UnderstandQuestion December 05, 2005 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Sorry, I am still confused, can you post the answers to the questions?
- Coding: Write code to encode xml element (as char *) as Byte *
- Algorithm: Is there anything else you could do to (in many cases) compress this even furthur?

- Sys March 05, 2006 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

this seems like a compression algorithm question. is there an easy way to encode strings to bytes?

- visitor April 18, 2006 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Just apply Huffman's compression algorithm by sorting all the words by their length descending. now the longest words get a value of 0, then next one get 1 and so on..
once you form this, just use the same procedure listed in Corman to form a tree to compress the algorithm.

- vJ October 27, 2006 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Shouldn't it be sorted by the number of times each element appears descending?

- Pratap May 08, 2007 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

can not be it done by simplest way, like take ascii of character and add 5 or anything to it. or use Hashed value?

- codebug June 05, 2007 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

What exactly do u mean? Can you give an example on this?

- J May 03, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i had a brain damage after reading this question , oops now the captcha image interperting seems a challenge ... god bless me.

- braindamage July 27, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i had a brain damage after reading this question , oops now the captcha image interperting seems a challenge ... god bless me.

- braindamage July 27, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I really need sum sleep to digest after reading this question.. :)

- needsleep October 05, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Stupid and meaningless question. I hate computer Science.

- Noname January 08, 2007 | Flag Reply


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