Microsoft Interview Question for Senior Software Development Engineers


Team: Bing
Country: United States
Interview Type: In-Person




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

My answer:
- verify that the frequency is distributed evenly for all the possible numbers
- Verify that the distance between repititions is about the size of the set (1000) for each number
- Verify that the distance between consecutive random numbers is random in itself
- Verify that the numbers 0-999 are only generated
- Verify that in each run you do not get the same sequence of random numbers. Seed it differently
- For visual identification of anomalies, plot the values (y-axis as random number, x-axis as each attempt)

- IntwPrep.MS January 17, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1. Random number => no predictable pattern in numbers generated => the diff between the nos should not be the same, etc

2. Each number in between 0-999 has to have equal probability of occurrence. So, we should maintain frequency counts and verify that no single number stands out w.r.t. frequency.

- smallchallenges January 17, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Chi Square test.

- Anonymous January 17, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I would be referring to diehard tests. Check Wikipedia.
And, of course that any returned int fits the specified range.
For really depth testing, we could test it is not leaking memory, etc.

- pinebit January 17, 2014 | 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