Skip to content
Related Articles

Related Articles

Goldman Sachs Interview Experience | Off-Campus
  • Difficulty Level : Hard
  • Last Updated : 02 Mar, 2021
GeeksforGeeks - Summer Carnival Banner

I gave my off-campus interview at Goldman Sachs for the Analyst post (SDE1).

Experience: (1+ year)

Screening round: 2 coding questions (1.5 hours total time)

Round 1(1 hour):

  1. Search in a rotated sorted array
  2. max sum path in matrix starting from (row-1, 0) to (0, col-1)
  3. Design HashMap

Round 2 (1 hour):

  1. Design HashSet
  2. s distinct colors of socks are given each with frequency n. You have to pick k recent pairs of socks in a minimum number of polls.
  3. Given a string, find a string that is just greater in lexicographic ordering than the given string.
    E.g. blackba -> blakabc
       Dcba -> Not possible
  4. Deep dive into one of the projects

Round 3 (1 hour):

  1. The Shortest distance from a source node to destination node in a directed and unweighted graph
  2. Each nut has its corresponding sized bolt in the other set. Arrange the nuts and bolts to align according to their sizes without comparing a nut to a nut or a bolt to a bolt
    SNm = {N(4),N(9),N(1).....}
    SBm = {B(9),B(1),B(4).....}
  3. Given an array of n elements find a set of k numbers that sum to zero
    E.g. k=3, (print all sets of k numbers)
    arr= [1, 1, 0, -1, 2, -2]
    Ans: (1, 0, -1), (1, 0, -1), (0, -2, 2)
  4. Given a set of 5 blue balls and 5 red balls, arrange them in two containers such that the chances of picking up a red ball is highest

Round 4 (1 hour):

  1. Deep dive into 1 of the projects
  2. Count the number of rotations in an array that is rotated, sorted, and contains duplicate elements. (Expected O(log n))
    Input: [3, 3, 4, 5, 6, 1, 1, 2]; Output: 3
  3. Difference between LinkedHashmap and HashMap
  4. Design of linked hashmap
  5. (As I had one of the internships done in graph algorithms the interviewer asked me) The traveling salesman problem. I told him that it is NP-complete but there exists a polynomial-time 2-approximate algorithm which is Minimum Spanning Tree. He then asked me the algorithm for MST.

Round 5 (Hiring Manager):

  1. Tell me about yourself
  2. Deep dive into many projects and the architecture that I used in the previous company
  3. Told me about the hierarchy in GS and different kinds of teams and tech stack
  4. What are your strengths and weaknesses?
  5. Why GS?

Result: Selected

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.  To complete your preparation from learning a language to DS Algo and many more,  please refer Complete Interview Preparation Course.   In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :