Interview Question


Team: Dev
Country: India




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

Please add more information about the questions. For example, i am not if the set has x elements, and will it have same value for the elements, for example, two 3, two 4,and if the different subgroup could pick the same element in the set as its size. Also i am not sure about the meaning of the "however the ordering of the group should be intact(cannot switch positions)", does it mean that only a continous sub parptition of the sequence could be in the one sub group? for example, if choose 3 as the size of first subgroup, then it will contain 0-2 elements of the sequence in the sub group, and if choose 4 as the size of the second sub group, then it will contains 3-6 elements of the sequence in the sub group, etc. I am also quite sure the meansing of "sum of squares of the differences of 1's and 2's in each sub group", is the the sum of the squares of the differences of number of 1's and number 2's in each sub group? So if the subgroups is:
121111, the difference would be 4, the square is 16? Please give some example showing the question's requirement. Thanks.

- Anonymous March 25, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Please add more information about the questions. For example, i am not if the set has x elements, and will it have same value for the elements, for example, two 3, two 4,and if the different subgroup could pick the same element in the set as its size. Also i am not sure about the meaning of the "however the ordering of the group should be intact(cannot switch positions)", does it mean that only a continous sub parptition of the sequence could be in the one sub group? for example, if choose 3 as the size of first subgroup, then it will contain 0-2 elements of the sequence in the sub group, and if choose 4 as the size of the second sub group, then it will contains 3-6 elements of the sequence in the sub group, etc. I am also quite sure the meansing of "sum of squares of the differences of 1's and 2's in each sub group", is the the sum of the squares of the differences of number of 1's and number 2's in each sub group? So if the subgroups is:
121111, the difference would be 4, the square is 16? Please give some example showing the question's requirement. Thanks.
And one more question is that is X fixed?

- chenlc626 March 25, 2013 | 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