Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Goldman Sachs Interview Experience (for Experienced)

  • Difficulty Level : Hard
  • Last Updated : 29 Sep, 2018

Round 1: It was Hackerrank test for 2 hours. Both questions were matrix based

    1. Given a matrix consisting of only zeroes and ones.Cell containing 1 is available for connection and cell with 0 is not. The task is to find how many number of unique connections that can be made with adjacent cells (on all 8 sides).
      e.g.,

      Hey geek! It's time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!

      Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsoft, TCS, Wipro, Google and many more!

      1
      0
      0
      1
      0
      1
      1
      1
      1
      0
      0
      1

      The answer for above matrix is 8
      Hint: Calculate all possible connections using BFS and the answer is half of it.In the above case, 16 such connections can be made with adjacent 1s and 8 is the result.

    2. Given a matrix of integers, task is to find out number of positional elements. A positional element is one which is either minimum or maximum in a row or in a column. If there are multiple minimum or maximum elements in a row or a column, return -1.
      e.g.,
      1
      3
      4
      5
      2
      9
      8
      7
      6

      The result for above matrix would be 7.
      Hint: Maintain, row wise and column wise minimum and maximum in separate vectors and with a second traversal of matrix, we can find out number of positional elements.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!