Microsoft Interview Question for Software Engineer / Developers






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

n^100
2^n
n!
n^n

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

n^n,n!,2^n,n^100

- Fred October 05, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Correct answer.

- russoue February 08, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Almost, except 2^n isn't asymptotically greater than n^100

You can easily see this when you take the log(base2) of n^100 and 2^n.

log(base2)(n^100) == 100 * log(base2)(n)
log(base2)(2^n) == n * log(base2)(2) == n

Obviously 100 * log(base2)(n) > n for any value of n > 1 and consequently n^100 is > 2^n for any n > 1.

Therefore the correct ordering is the following:

n^n
n!
n^100
2^n

- Michael March 12, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Almost Michael, except that 100*log_2(n) < n for reasonably large n in fact take n > 2^10. What did you do? check for a few values and make an "obvious" generalization?

btw, do you realize that you indirectly have claimed that P = NP?

You need to brush up on your Math.

btw, why is this under Terminology & Trivia? Don't we have a section for Basics?

- T March 13, 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