Microsoft Interview Question for Software Engineer / Developers


Country: United States
Interview Type: In-Person




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

Divide and conquer is a good stategy here.
Get the # of gas stations from each state and add them.
Each state can subdivide its seach to districts and so on

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

Well you can use order of magnitude estinations.
First I assume that per person in the US 10 miles are driven 10^1
Next I assume that the population of the us is >300 10^9 (I round up from 10^~8.5)
Using this I estimate that each day 10^10 miles are driven
I assume average fuel consumption is 10^1 miles per gallon
Now I can say that cars use 10^9 gallons
I assume the average fuel tank is 10^1
I can guess that there are 10^8 refills per day
I assume that a gas station on average services 10^3 cars
My estimate is 10^5 gas stations in the US.
Afterwards I looked it up and it's 121,446 so I did pretty well.

- Order of magnitude estimation March 18, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Why are you assuming there will be one one refill per station per day.

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

From the US census you can look up what is the average density of gas station / population ( some number ). Multiply that by the population and you get the answer.
10 gas stations / 1000 people * (300,000) = 3000 gas stations. Although this answer will be within the standard deviation and you will have to find the upper and lower limit
+- std.dev.
Another way would be to do data mining. Either way you need some information, you cannot pull a number out of thin air. Well, unless you travel through each and every street and corner of the country.
Another great idea: gather telephone books from each and every area of the US and count the number of gas stations in each region and add them up. Not all gas stations are labelled gas stations.
So, pick and choose, or maybe another idea!!

- Kruz March 18, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I would query the foursquare db for such information and also compare with waze db to have a more accurated result.

- Anonymous April 01, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 3 vote

I will GOOGLE it.

- bing sucks March 06, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Probly BING it ;)

- shankarnarayanan.com March 29, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Pun intended..? (good one)

- o.O April 17, 2014 | 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