Motorola Mobility
3.1 of 5 1,429 reviews
www.motorola.com Chicago, IL 5000+ Employees

Motorola Mobility Software Engineering Intern Interview Question (student candidate)

I interviewed in Sunnyvale, CA and was asked:
"Reverse the words in a string, but not the characters. Do it in linear time."
Add Tags [?]
Answer Flag Question

Part of a Software Engineering Intern Interview Review - one of 185 Motorola Mobility Interview Reviews

Answers & Comments

0
of 1
vote
Google it, not hard at all.
- Interview Candidate on Feb 17, 2010 Flag Response
0
of 0
votes
public String reverseWords(String in){
String[] tokens = in.split("");
if(tokens.length <= 1) return in;
StringBuilder sb = new StringBuilder();
for(int i = tokens.length-1; i >= 0; i--)
sb.append(tokens[i]);

return sb.toString();
}
- ST on Mar 13, 2012 Flag Response

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


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

Glassdoor is your free inside look at Motorola Mobility interview questions and advice. All interview reviews posted anonymously by Motorola Mobility employees and interview candidates.