Work in HR or Recruiting?
Microsoft
3.6 of 5 5,161 reviews
www.microsoft.com Redmond, WA 5000+ Employees

774 interview experiences Back to all Microsoft Interview Questions & Reviews

Interview Question for Project Manager at Microsoft:
Mar 21, 2012

How do you reverse the order of words in a given sentence? (e.g. Today is sunny -> sunny is Today) You have to write the code in a language of choice


Add Tags [?]

See more for this Microsoft Project Manager Interview

Helpful Question?  
Yes | No
Inappropriate?

Answers & Comments (1)

1 of 1 people found this helpful

Mar 21, 2012

by Interview Candidate:

I started with asking my interviewer questions regarding various input-output scenarios (for instance, how to handle non-alphanumeric characters such as exclamation mark, comma, etc. Also how to handle null string)
I wrote in Java in a simple way:
- Split the sentence using blank space
- Iterate the produced vector and add it to a new vector one by one
- The new vector is your answer

He then asked me to code String.split() myself
Helpful Answer?  
Yes | No
Inappropriate?

To comment on this question, Sign In with Facebook or Sign Up

Microsoft – Why Work for Us?

Amazing things happen here! From gamers to governments, moms to mega-corporations, Microsoft helps customers all over the globe to realize their potential. Many people think Microsoft = software. Yes, we do… Full Overview

Provided by employer [?]

Tags are like keywords that help categorize interview questions that have something in common.