Goldman Sachs Interview Experience | Coding Round

Coding Round had 4 sections and time duration was 2 hours:

Section 1: 2 coding questions.

Question 1 was to find lexographically smallest sub-sequence of a given length k from a given string of non-capital alphabets. Eg, if string is bacb and k = 2, then output will be ab.

Question 2: An institute provides 3 cricket courses: A, B, and C. Each course has a fees associated to it. Courses can be individually provided, or can be provided in a group, say AB or AC or CAB. Rahul wants to apply in the institute such that he can get all the 3 courses and has to pay the minimum possible fees. Very easy question, brute force approach was also accepted.

Section 2: 10 MCQs.

Topics included Bayes Theorem (Probability), Networks (OSI Layer, etc), P&C, basic JAVA, DS (Linked List), etc

Section 3: 1 coding question.

You are given an array of integers and an integer k. Convert each integer in the array to its corresponding binary number of k length (eg, if integer is 1 and k = 2, binary no = 01). Now find all possible binary numbers that you can generate from each number by flipping 1 or more 1s in it (eg, 0010 will give 0010, 0011, 0110, 1010, 1110, 0111, 1011, 1111). Take union of all these binary numbers and return the resulting array.

Eg, if array is [1, 2] and k = 2, then output will be [01, 10, 11]. Explanation: 1 -> 01 -> 01, 11 & 2 -> 10 -> 10, 11; union of (01, 11, 10, 11) is (01, 10, 11)

Section 4: 2 HR questions.

1. Write about an incident when you pushed your limits and acheived something.

2. Write about your experience working in a team, where you were not the leader. What were your contributions?

Write your Interview Experience or mail it to

My Personal Notes arrow_drop_up

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.