Interview Question for Software Engineer in Tests






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

as long as the max number of members in a team, <= # of rest people
there's always a simple greedy solution

- geniusxsy November 18, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Can you please explain it in detail. Thanks.

- Anonymous November 19, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1. Sort the teams in decreasing order of the number of members in them.
2. Pick the 1st team (with maximum members) and arrange them around the table.
3. Pick the 2nd team and arrange the members between the already present members around the table.
Repeat step 3 until no teams are left

- Dumbo November 19, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

How about three teams with size 10,5 and 4?

- Jams November 19, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Can anyone code it?

- Anonymous November 19, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Dumbo is right and you can use permutation to generate total number of seating arrange that can be found........

- Anonymous November 20, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

@Dumbo solution works as long as @geniusxsy condition is met

- KBSorter November 21, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

@Dumbo solution works as long as @geniusxsy condition is met

- KBSorter November 21, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1) Sit one member from each of the n teams in sequence. That is, if TM[i,j] is i-th member of team j, and Mi is number of members in i-th team, sit like this: TM[1,1], TM[1,2], TM[1,3], ... TM[1,M1], TM[2,1], TM[2,2],...TM[2,M2], and so on.

When the circular sitting is finished, check if team of last two members is same. That is, TM[n] == TM[1]. If so, swap TM[n-1,Mn-1] & TM[n,Mn].

?

- Nix November 22, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Does any one have a c or C ++ code to impliment the logic ?

- jyjonnax December 03, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

can anyone solve this

- travis September 22, 2010 | 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