Goldman Sachs Interview Question for Software Engineer / Developers






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

The resulting matrix would be a n*n matrix. Each element of the matrix can be computed, independently of the other. So if there are n^2 computers, each has a column and a row to multiply. For e.g. computer1 has row1 and col1, computer2 has row1 and col2. Each computer takes O(n) to multiply the row and column. So the whole matrix can be multiplied in O(n) time.

- sdm February 23, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

(Except for the fact that the matrix is stored on one computer, which requires Omega(n^2) time just to push the entries over its network interface...)

- Anonymous February 23, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

If you have n^3 computers, the cost can be further reduced to O(logn) since the multiplication and adding a row can be distributed onto n computers and done with parallel reduction.

- Anonymous June 22, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

strassen's algorithm?

matrix decomposition?

- Zaphod February 24, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

- You got a matrix of M x N
- Arrange the available machines in form of a logical grid of P x Q
- Give each machine a block of matrix M/P x N/Q
- Each machine will self-multiply each small block given above. O((MN/PQ)^3) complexity
- Each machine will send the result to the first machine in its row which will add up the sub-blocks element by element.
- All machines in the first column combined will have the result.

- Parth_Mehta_UIC March 20, 2012 | 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