Microsoft Interview Question for Software Engineer / Developers






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

1.) 52 cards
2.) 23 cards
3.) 56 cards
4.) some cards turned upside down
5.) repeating cards (of same suite & same value)

- yeah December 01, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I'm not able to understand ,how these test cases will help

- sadineniramarao December 02, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The main test case will be to test if the cards are properly shuffled when compared to the starting state. We need to calculate the degree of reordering and keep shuffling until the required degree is reached.

- Das December 09, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

http://en.wikipedia.org/wiki/Shuffling

- Blackjack December 29, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

a) Take hash of shuffle card values and stored it into hash table
b) is hash of current hash_value is in the hash table then collision.

while(count < MAX_THRESHOLD)
{
hash_key = sha256_hash_of(get_shuffle());
if( is_present_in_the_hashtable(hash_key)) {
++collision;
print collision, count - hashtable.getcount(count);
} else {
hashtable.insert(hash_key, count);
}
}

- ANS: December 06, 2009 | 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