Intern Engineer Interview Questions

20,634 intern engineer interview questions shared by candidates

Given a string of Rs and Gs, design an algorithm to produce a string with Rs in the front and Gs after that. The number of flips from Rs to Gs or otherwise should be minimum. The number of Rs and Gs in the end need not be same as that in the beginning, however the length of the entire string should be the same.
avatar

Software Development Engineer Intern

Interviewed at Amazon

3.5
May 26, 2012

Given a string of Rs and Gs, design an algorithm to produce a string with Rs in the front and Gs after that. The number of flips from Rs to Gs or otherwise should be minimum. The number of Rs and Gs in the end need not be same as that in the beginning, however the length of the entire string should be the same.

Viewing 71 - 80 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 20,634 interview questions and reports from Intern engineer interviews. Prepare for your interview. Get hired. Love your job.